Branch: Tag:

2008-12-23

2008-12-23 13:17:22 by Martin Stjernholm <mast@lysator.liu.se>

Support IDN hostnames for port binding and in roxen.gethostbyname.

Rev: server/base_server/hosts.pike:1.35
Rev: server/base_server/roxen.pike:1.1007
Rev: server/config_interface/sites/site_content.pike:1.154
Rev: server/etc/modules/Roxen.pmod:1.263

6:   // 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   //!
135:   // 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 = ([]);
2554:    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;
2628:    }    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;
2819:    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;