Roxen.git / server / plugins / protocols / http.pike

version» Context lines:

Roxen.git/server/plugins/protocols/http.pike:1:   // This is a roxen protocol module.   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.381 2002/10/01 23:19:36 nilsson Exp $"; + constant cvs_version = "$Id: http.pike,v 1.382 2002/10/01 23:55:49 nilsson Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR      // HTTP protocol module.   #include <config.h>   #define TIMER_PREFIX "http:"   #include <timers.h>      inherit RequestID;   
Roxen.git/server/plugins/protocols/http.pike:652:    supports = (< "images", "gifinline", "forms", "mailto">);   #endif    //REQUEST_WERR("HTTP: parse_got(): supports");    if(!referer) referer = ({ });    if(misc->proxyauth)    {    // The Proxy-authorization header should be removed... So there.    mixed tmp1,tmp2;       foreach(tmp2 = (raw / "\n"), tmp1) { -  if(!search(lower_case(tmp1), "proxy-authorization:")) +  if(has_prefix(lower_case(tmp1), "proxy-authorization:"))    tmp2 -= ({tmp1});    }    raw = tmp2 * "\n";    }   #ifdef OLD_RXML_CONFIG    if(config_in_url) {    //REQUEST_WERR("HTTP: parse_got(): config_in_url");    really_set_config( mod_config );    return 1;    }
Roxen.git/server/plugins/protocols/http.pike:815:    if( !client )    {    sscanf(contents, "%s via", contents);    client_var->Fullname=contents;    client = contents/" " - ({ "" });    }    break;       case "request-range":    contents = lower_case(contents-" "); -  if(!search(contents, "bytes")) +  if(has_prefix(contents, "bytes"))    // Only care about "byte" ranges.    misc->range = contents[6..];    break;       case "range":    contents = lower_case(contents-" "); -  if(!misc->range && !search(contents, "bytes")) +  if(!misc->range && has_prefix(contents, "bytes"))    // Only care about "byte" ranges. Also the Request-Range header    // has precedence since Stupid Netscape (TM) sends both but can't    // handle multipart/byteranges but only multipart/x-byteranges.    // Duh!!!    misc->range = contents[6..];    break;          case "host":    case "connection":
Roxen.git/server/plugins/protocols/http.pike:1987:    if (has_prefix(raw_url, port_obj->name+"://") &&    (conf = port_obj->find_configuration_for_url(raw_url,    this_object(), 1))) {    sscanf(raw_url[sizeof(port_obj->name+"://")..],    "%[^/]%s", misc->host, raw_url);    } else {    if (misc->host) {    conf =    port_obj->find_configuration_for_url(port_obj->name + "://" +    misc->host + -  (search(misc->host, ":")<0? -  (":"+port_obj->port):"") + +  (has_value(misc->host, ":")<0? +  "":(":"+port_obj->port)) +    raw_url,    this_object());    } else {    conf =    port_obj->find_configuration_for_url(port_obj->name +    "://*:" + port_obj->port +    raw_url,    this_object());    }    }