Roxen.git
/
server
/
plugins
/
protocols
/
prot_https.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/plugins/protocols/prot_https.pike:1:
// This is a roxen protocol module. // Copyright © 2001, Roxen IS.
-
// $Id: prot_https.pike,v 2.
5
2002/
06
/
14
00:
38
:
39
nilsson Exp $
+
// $Id: prot_https.pike,v 2.
6
2002/
10
/
22
00:
13
:
34
nilsson Exp $
// --- Debug defines --- #ifdef SSL3_DEBUG # define SSL3_WERR(X) werror("SSL3: "+X+"\n") #else # define SSL3_WERR(X) #endif inherit SSLProtocol;
Roxen.git/server/plugins/protocols/prot_https.pike:47:
die(); } void read_callback(object id, string s) { SSL3_WERR(sprintf("fallback_redirect_request::read_callback(X, \"%s\")\n", s)); in += s; string name; string prefix;
-
if (
search
(in, "\r\n\r\n")
>= 0
)
+
if (
has_value
(in, "\r\n\r\n"))
{ // werror("request = '%s'\n", in); array(string) lines = in / "\r\n"; array(string) req = replace(lines[0], "\t", " ") / " "; if (sizeof(req) < 2) { out = "HTTP/1.0 400 Bad Request\r\n\r\n"; } else {
Roxen.git/server/plugins/protocols/prot_https.pike:120:
class http_fallback { object my_fd; void ssl_alert_callback(object alert, object|int n, string data) { SSL3_WERR(sprintf("http_fallback(X, %O, \"%s\")", n, data)); // trace(1); if ( (my_fd->current_write_state->seq_num == 0)
-
&&
search
(lower_case(data), "http"))
+
&&
has_value
(lower_case(data), "http"))
{ object raw_fd = my_fd->socket; my_fd->socket = 0; /* Redirect to a https-url */ // my_fd->set_close_callback(0); // my_fd->leave_me_alone = 1; fallback_redirect_request(raw_fd, data, my_fd->config && my_fd->config->query("MyWorldLocation"),