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

version» Context lines:

Roxen.git/server/plugins/protocols/http.pike:1:   // This is a ChiliMoon protocol module.   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.391 2002/11/14 23:31:48 mani Exp $"; + constant cvs_version = "$Id: http.pike,v 1.392 2003/01/14 22:53:37 zino 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:1242:    lines[off] = indent + "<font size='+1'><b>"+down+code+"</a></b></font></a>";    }    lines[max(off-20,0)] = "<a name=here>"+lines[max(off-20,0)]+"</a>";       return error_page_header (variables->file) +    "<font size='-1'><pre>" + lines*"\n" + "</pre></font>\n"    "</body></html>";   }      // The wrapper for multiple ranges (send a multipart/byteranges reply). - #define BOUND "Byte_Me_Now_Roxen" + #define BOUND "Byte_Me_Now_Chily"      class MultiRangeWrapper   {    object file;    function rcb;    int current_pos, len, separator;    array ranges;    array range_info = ({});    string type;    string stored_data = "";
Roxen.git/server/plugins/protocols/http.pike:1877:    {    // FIXME: port_obj->name & port_obj->default_port are constant    // consider caching them?       // RFC 2068 5.1.2:    //    // To allow for transition to absoluteURIs in all requests in future    // versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI    // form in requests, even though HTTP/1.1 clients will only generate    // them in requests to proxies. + #ifdef RFC2068    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 { +  } +  else + #endif +  {    if (misc->host) {    conf =    port_obj->find_configuration_for_url(port_obj->name + "://" +    misc->host +    (has_value(misc->host, ":")<0?    "":(":"+port_obj->port)) +    raw_url,    this_object());    } else {    conf =