2000-09-28
2000-09-28 02:07:12 by Per Hedbor <ph@opera.com>
-
b8fd5ca410717293a49621db59cf474a7bc64ef6
(32 lines)
(+18/-14)
[
Show
| Annotate
]
Branch: 5.2
Solve the 'do not mutilate port variables' bug discussed. Fixes most of [Bug 437 (#437)]
Rev: server/base_server/basic_defvar.pike:1.18
Rev: server/base_server/roxen.pike:1.565
Rev: server/etc/modules/Variable.pmod/module.pmod:1.23
4:
// Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.
// ABS and suicide systems contributed freely by Francesco Chemolli
- constant cvs_version="$Id: roxen.pike,v 1.564 2000/09/25 09:31:53 per Exp $";
+ constant cvs_version="$Id: roxen.pike,v 1.565 2000/09/28 02:07:11 per Exp $";
// Used when running threaded to find out which thread is the backend thread,
// for debug purposes only.
825:
}
}
+ #if constant(SSL.sslfile)
class SSLProtocol
//! Base protocol for SSL ports. Exactly like Port, but uses SSL.
{
inherit Protocol;
- #if constant(Crypto) && constant(Crypto.rsa) && constant(Standards) && constant(Standards.PKCS.RSA) && constant(SSL) && constant(SSL.sslfile)
-
+
// SSL context
object ctx;
1019: Inside #if constant(Crypto) && constant(Crypto.rsa) && constant(Standards) && constant(Standards.PKCS.RSA) && constant(SSL) && constant(SSL.sslfile)
#endif
::create(pn, i);
}
- #else /* !constant(SSL.sslfile) */
- void create(int pn, string i)
- {
- report_error(LOC_M(18,"No SSL support available.")+"\n");
- destruct();
- }
- #endif /* constant(SSL.sslfile) */
+
string _sprintf( )
{
return "SSLProtocol("+name+"://"+ip+":"+port+")";
}
}
-
+ #endif
#if constant(HTTPLoop.prog)
class FHTTP
1273:
}
+ #if constant(SSL.sslfile)
class HTTPS
{
inherit SSLProtocol;
1381:
}
}
- #if constant(SSL.sslfile)
+
class http_fallback {
object my_fd;
1432: Inside #if constant(SSL.sslfile)
}
return q;
}
- #endif /* constant(SSL.sslfile) */
+
int set_cookie, set_cookie_only_once;
void fix_cvars( Variable.Variable a )
1452:
::create( @args );
}
}
+ #endif
class FTP
{
1475:
}
}
+ #if constant(SSL.sslfile)
class FTPS
{
inherit SSLProtocol;
1496:
::create( @args );
}
}
+ #endif
class GOPHER
{
1550:
#endif
"http":HTTP,
"ftp":FTP,
- #if constant(Crypto) && constant(Crypto.rsa) && constant(Standards) && constant(Standards.PKCS.RSA) && constant(SSL) && constant(SSL.sslfile)
+
+ #if constant(Crypto) && constant(SSL.sslfile)
"https":HTTPS,
"ftps":FTPS,
#endif
1655:
url, conf->query_name());
return 0;
}
+
+ if( !protocols[ protocol ] )
+ {
+ report_error(LOC_M(0,"The protocol '%s' is not available")+"\n", protocol);
+ return 0;
+ }
+
sscanf(host, "%[^:]:%d", host, port);
if( !port )
3431:
(program)"module";
dump( "protocols/http.pike");
dump( "protocols/ftp.pike");
- dump( "protocols/https.pike");
+
dump( "base_server/state.pike" );
dump( "base_server/highlight_pike.pike");
dump( "base_server/wizard.pike" );