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.906 2005/11/14 09:08:08 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.907 2005/11/14 13:00:47 mast 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:2140:   mapping(string:mapping(string:mapping(int:Protocol))) open_ports = ([ ]);      // url:"port" ==> Protocol.   mapping(string:mapping(string:Configuration)) urls = ([]);   array sorted_urls = ({});      array(string) find_ips_for( string what )   {    if( what == "*" || lower_case(what) == "any" )    return ({ 0, - #if 0 && constant(__ROXEN_SUPPORTS_IPV6__) + #if constant(__ROXEN_SUPPORTS_IPV6__)    "::",   #endif /* __ROXEN_SUPPORTS_IPV6__ */    }); // ANY       if( is_ip( what ) )    return ({ what });    else if (what[0] == '[' && what[-1] == ']') {    /* RFC 3986 3.2.2. Host    *    * host = IP-literal / IPv4address / reg-name
Roxen.git/server/base_server/roxen.pike:2355:    return 0;    }       mapping m;    if( !( m = open_ports[ protocol ] ) )    // always add 'ANY' (0) and 'IPv6_ANY' (::) here, as empty mappings,    // for speed reasons.    // There is now no need to check for both open_ports[prot][0] and    // open_ports[prot][0][port], we can go directly to the latter    // test. -  m = open_ports[ protocol ] = ([ 0:([]), /* "::":([]) */ ]); +  m = open_ports[ protocol ] = ([ 0:([]), "::":([]) ]);       if (prot->supports_ipless ) {    // Check if the ANY port is already open for this port, since this    // protocol supports IP-less virtual hosting, there is no need to    // open yet another port if it is, since that would mosts probably    // only conflict with the ANY port anyway. (this is true on most    // OSes, it works on Solaris, but fails on linux)    array(string) ipv6 = filter(required_hosts - ({ 0 }), has_value, ":");    array(string) ipv4 = required_hosts - ipv6;    if (m[0][port] && sizeof(ipv4 - ({ 0 }))) {    // We have a non-ANY IPv4 IP number.    ipv4 = ({ 0 });    } - #if 0 && constant(__ROXEN_SUPPORTS_IPV6__) + #if constant(__ROXEN_SUPPORTS_IPV6__)    if (m["::"][port] && sizeof(ipv6 - ({ "::" }))) {    // We have a non-ANY IPv6 IP number.    ipv6 = ({ "::" });    }    required_hosts = ipv4 + ipv6;   #else    if (sizeof(ipv6)) {    foreach(ipv6, string p) {    report_warning(LOC_M(65, "IPv6 port for URL %s disabled: %s\n"),    url, p);