Branch: Tag:

2008-12-11

2008-12-11 15:32:54 by Jonas Wallden <jonasw@roxen.com>

Fix IPv6 bugs.

Rev: server/base_server/module.pike:1.233
Rev: server/base_server/prototypes.pike:1.221
Rev: server/base_server/roxen.pike:1.1001
Rev: server/config_interface/sites/site_content.pike:1.153
Rev: server/etc/modules/Roxen.pmod:1.261
Rev: server/etc/modules/RoxenRPC.pmod/HTTP.pmod/Client.pike:1.11
Rev: server/modules/proxies/gopher.pike:1.28
Rev: server/modules/proxies/relay2.pike:1.39
Rev: server/modules/proxies/wais.pike:1.29
Rev: server/modules/tags/html_wash.pike:1.34
Rev: server/protocols/http.pike:1.572

1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS. - // $Id: module.pike,v 1.232 2008/10/12 22:14:03 mast Exp $ + // $Id: module.pike,v 1.233 2008/12/11 15:32:28 jonasw Exp $      #include <module_constants.h>   #include <module.h>
276:    error("Please do not call this function from create()!\n");    array(string) urls = copy_value(_my_configuration->query("URLs"));    string hostname; -  if (string world_url = _my_configuration->query ("MyWorldLocation")) -  sscanf (world_url, "%*s://%s%*[:/]", hostname); +  if (string world_url = _my_configuration->query ("MyWorldLocation")) { +  Standards.URI uri = Standards.URI(world_url); +  hostname = uri->host; +  }    if (!hostname) hostname = gethostname();    for (int i = 0; i < sizeof (urls); i++)    {
305:    error("Please do not call this function from create()!\n");    string hostname;    string world_url = _my_configuration->query("MyWorldLocation"); -  if(world_url) -  sscanf(world_url, "%*s://%s%*[:/]", hostname); +  if (world_url) { +  Standards.URI uri = Standards.URI(world_url); +  hostname = uri->host; +  }    if(!hostname)    hostname = gethostname();   #ifdef LOCATION_URL_DEBUG