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.905 2005/10/07 09:32:30 anders Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.906 2005/11/14 09:08:08 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 constant(__ROXEN_SUPPORTS_IPV6__) + #if 0 && 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 constant(__ROXEN_SUPPORTS_IPV6__) + #if 0 && 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);
Roxen.git/server/base_server/roxen.pike:4130:    __REG_PROJ("roxen_""config", "translations/%L/roxen_config.xml");    __REG_PROJ("roxen_""message", "translations/%L/roxen_message.xml");    __REG_PROJ("admin_""tasks", "translations/%L/admin_tasks.xml");    Locale.set_default_project_path("translations/%L/%P.xml");   #undef __REG_PROJ       define_global_variables();       // for module encoding stuff    + #if constant (Protocols.LDAP.FilterError) +  // Pike 7.7 or later - we use the native LDAP module and link the +  // migration alias NewLDAP to it. +  add_constant ("NewLDAP", Protocols.LDAP); + #else +  // Older pike - use our own LDAP protocol as NewLDAP. +  add_constant ("NewLDAP", _NewLDAP); + #endif +     add_constant( "CFUserDBModule",config_userdb_module );       //add_constant( "ArgCache", ArgCache );    //add_constant( "roxen.load_image", load_image );       if (all_constants()["roxen"]) {    error("Duplicate Roxen object!\n");    }       // simplify dumped strings.