Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // 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.999 2008/11/04 18:05:16 mast Exp $"; + constant cvs_version="$Id$";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:1579:    raw_url = path;    method = "GET";    raw = "GET " + raw_url + " HTTP/1.1\r\n\r\n";    [port_obj, mapping(string:mixed) url_data] = find_port_for_url (uri, 0);    if (url_data) {    conf = url_data->conf;    if (!conf->inited) conf->enable_all_modules();    if (string config_path = url_data->path)    adjust_for_config_path (config_path);    } +  +  // Update the cached URL base to keep url_base() happy. +  uri->path = misc->site_prefix_path || ""; +  uri->query = UNDEFINED; +  uri->fragment = UNDEFINED; +  cached_url_base = sprintf("%s", uri);    return set_path( raw_url );    }       protected string _sprintf()    {    return sprintf("RequestID(conf=%O; not_query=%O)", conf, not_query );    }       protected void create()    {    client = ({ "Roxen" });    prot = "INTERNAL"; -  +  port_obj = InternalProtocol();    method = "GET";    real_variables = ([]);    variables = FakedVariables( real_variables );    root_id = this_object(); -  +  cached_url_base = "internal://0.0.0.0:0/";       misc = ([ "pref_languages": PrefLanguages(),    "cacheable": INITIAL_CACHEABLE,    ]);    connection_misc = ([]);    cookies = CookieJar();    throttle = ([]);    client_var = ([]);    request_headers = ([]);    prestate = (<>);
Roxen.git/server/base_server/roxen.pike:2127:    setup (pn, i);    bind (ignore_eaddrinuse);    }       protected string _sprintf( )    {    return "Protocol(" + get_url() + ")";    }   }    + class InternalProtocol + //! Protocol for internal requests that are not linked to any real request. + { +  inherit Protocol; +  +  constant name = "internal"; +  +  constant prot_name = "internal"; +  +  constant supports_ipless = 1; +  constant default_port = 0; +  +  protected void create() +  { +  path = ""; +  port = default_port; +  ip = "0.0.0.0"; +  } + } +    #if constant(SSL.sslfile)   class SSLProtocol   //! Base protocol for SSL ports. Exactly like Port, but uses SSL.   {    inherit Protocol;       // SSL context    SSL.context ctx = SSL.context();       int cert_failure;