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.898 2005/03/07 16:47:34 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.899 2005/03/10 18:06:12 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:2077:   // prot:ip:port ==> Protocol.   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, "::" }); // ANY +  return ({ 0, + #if constant(__ROXEN_SUPPORTS_IPV6__) +  "::", + #endif /* __ROXEN_SUPPORTS_IPV6__ */ +  }); // ANY       if( is_ip( what ) )    return ({ what });    else if (has_suffix(lower_case(what), ".ipv6")) {    // draft-masinter-url-ipv6-00 3    //    // a) replace every colon ":" with a "-"    // b) append ".ipv6" to the end.    return ({ replace(what[..sizeof(what)-6], "-", ":") });    }
Roxen.git/server/base_server/roxen.pike:2293:    // 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 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(0, "IPv6 port for URL %s disabled: %s\n"), +  url, p);    } -  +  } +  required_hosts = ipv4; + #endif /* __ROXEN_SUPPORTS_IPV6__ */ +  }       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];