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.899 2005/03/10 18:06:12 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.900 2005/03/30 17:52:39 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:2085:   {    if( what == "*" || lower_case(what) == "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")) { +  else if (what[0] == '[' && what[-1] == ']') { +  /* RFC 3986 3.2.2. Host +  * +  * host = IP-literal / IPv4address / reg-name +  * IP-literal = "[" ( IPv6address / IPvFuture ) "]" +  * IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) +  * +  * IPv6address is as in RFC3513. +  */ +  return ({ what[1..sizeof(what)-2] }); +  } 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], "-", ":") });    }    array res = gethostbyname( what );    if( res && sizeof( res[1] ) )    return Array.uniq(res[1]);