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.960 2008/02/05 17:41:57 wellhard Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.961 2008/04/07 13:04:47 grubba Exp $";      //! @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:2169:    return protocols;   }         mapping protocols;      // prot:ip:port ==> Protocol.   mapping(string:mapping(string:mapping(int:Protocol))) open_ports = ([ ]);      // url:"port" ==> Protocol. - mapping(string:mapping(string:Configuration)) urls = ([]); + mapping(string:mapping(string:Configuration|Protocol|array(Protocol)|string)) +  urls = ([]);   array sorted_urls = ({});      array(string) find_ips_for( string what )   {    if( what == "*" || lower_case(what) == "any" )    return ({ 0,   #if constant(__ROXEN_SUPPORTS_IPV6__)    "::",   #endif /* __ROXEN_SUPPORTS_IPV6__ */    }); // ANY
Roxen.git/server/base_server/roxen.pike:2432:    int failures;       foreach(required_hosts, string required_host)    {    if( m[ required_host ] && m[ required_host ][ port ] )    {    m[required_host][port]->ref(url, urls[url]);       urls[url]->port = m[required_host][port];    urls[ourl]->port = m[required_host][port]; +  if (urls[ourl]->ports) { +  urls[ourl]->ports += ({ m[required_host][port] }); +  } else { +  urls[ourl]->ports = ({ m[required_host][port] }); +  }    continue; /* No need to open a new port */    }       if( !m[ required_host ] )    m[ required_host ] = ([ ]);       mixed err;    if (err = catch {    m[ required_host ][ port ] = prot( port, required_host );    }) {
Roxen.git/server/base_server/roxen.pike:2474:    report_warning(LOC_M(22, "Binding the port on IP %s failed\n"    " for URL %s!\n"),    required_host, url);    }    continue;    }          urls[ url ]->port = m[ required_host ][ port ];    urls[ ourl ]->port = m[ required_host ][ port ]; +  if (urls[ourl]->ports) { +  urls[ourl]->ports += ({ m[required_host][port] }); +  } else { +  urls[ourl]->ports = ({ m[required_host][port] }); +  }    m[ required_host ][ port ]->ref(url, urls[url]);       if( !m[ required_host ][ port ]->bound )    failures++;    }    if (failures == sizeof(required_hosts))    {    report_error(LOC_M(23, "Cannot register URL %s!")+"\n", url);    return 0;    }