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.1006 2008/12/17 09:59:16 jonasw Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1007 2008/12/23 13:17:22 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:128:   }      protected int once_mode;      // Note that 2.5 is a nonexisting version. It's only used for the   // cache static optimization for tags such as <if> and <emit> inside   // <cache> since that optimization can give tricky incompatibilities   // with 2.4.   array(string) compat_levels = ({"2.1", "2.2", "2.4", "2.5",    "3.3", "3.4", -  "4.0", "4.5", "5.0"}); +  "4.0", "4.5", +  "5.0"});      #ifdef THREADS   mapping(string:string) thread_names = ([]);   string thread_name( object thread )   {    string tn;    if( thread_names[ tn=sprintf("%O",thread) ] )    return thread_names[tn];    return tn;   }
Roxen.git/server/base_server/roxen.pike:2547:      string normalize_url(string url)   {    if (!sizeof (url - " " - "\t")) return "";       url = lower_case( url );    Standards.URI ui = Standards.URI(url);    ui->fragment = 0;    if (ui->host == "any" || ui->host == "::")    ui->host = "*"; +  else +  // FIXME: Maybe Standards.URI should do this internally? +  ui->host = Standards.IDNA.zone_to_ascii (ui->host);       string host = ui->host;    string protocol = ui->scheme;    if (!host || !sizeof(host) || !protocols[protocol])    return "";    if (!ui->port)    ui->port = protocols[protocol]->default_port;    return (string) ui;   }   
Roxen.git/server/base_server/roxen.pike:2621:       if( (int)opts->nobind )    {    report_warning(    LOC_M(61,"Not binding the port %O, disabled in configuration")+"\n",    (string) ui );    return 0;    }    if (ui->host == "any" || ui->host == "::")    ui->host = "*"; +  else +  // FIXME: Maybe Standards.URI should do this internally? +  ui->host = Standards.IDNA.zone_to_ascii (ui->host);       protocol = ui->scheme;    host = ui->host;    if (!sizeof(host || "") || !protocols[protocol]) {    report_error(LOC_M(19,"Bad URL '%s' for server `%s'")+"\n",    (string) ui, conf->query_name());    }    if (!ui->port)    ui->port = protocols[protocol]->default_port;    port = ui->port;
Roxen.git/server/base_server/roxen.pike:2812:       if( !prot_obj->bound )    failures++;    }    if (failures == sizeof(required_hosts))    {    report_error(LOC_M(23, "Cannot register URL %s!")+"\n", url);    return 0;    }    sort_urls(); +  +  // The following will show the punycoded version for IDN hostnames. +  // That is intentional, to make it clear what actually happens.    report_notice(" "+LOC_S(3, "Registered %s for %s")+"\n",    url, conf->query_name() );    return 1;   }         Configuration find_configuration( string name )   //! Searches for a configuration with a name or fullname like the   //! given string. See also get_configuration().   {