Branch: Tag:

2001-10-05

2001-10-05 15:08:03 by Per Hedbor <ph@opera.com>

A fix for [Bug 2336 (#2336)], you can now explicitly specify the IP# to use for each port

Rev: server/base_server/configuration.pike:1.490
Rev: server/base_server/module.pike:1.130
Rev: server/base_server/roxen.pike:1.748
Rev: server/config_interface/sites/drop_site.pike:1.18
Rev: server/config_interface/sites/site_content.pike:1.129
Rev: server/etc/modules/Roxen.pmod:1.127
Rev: server/etc/modules/Variable.pmod/module.pmod:1.69
Rev: server/etc/test/tests/ftp/RoxenTest_ftp.pike:1.2
Rev: server/etc/test/tests/pike_async_process_test_common.pike:1.5

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.747 2001/10/01 15:07:47 per Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.748 2001/10/05 15:08:00 per Exp $";      // The argument cache. Used by the image cache.   ArgCache argcache;
1708:    string host, path, protocol;    int port;    if (!sizeof (url - " " - "\t")) return; +  mapping opts = ([]); +  string a, b; +  Standards.URI ui = Standards.URI(url); +  foreach( (ui->fragment||"")/";", string x ) +  { +  sscanf( x, "%s=%s", a, b ); +  opts[a]=b; +  } +  ui->fragment = 0; +  url = (string)ui;       url = replace( url, "/ANY", "/*" );    url = replace( url, "/any", "/*" );
1763:    int port;    string path;    +  Standards.URI ui = Standards.URI(url); +  mapping opts = ([]); +  string a, b; +  foreach( (ui->fragment||"")/";", string x ) +  { +  sscanf( x, "%s=%s", a, b ); +  opts[a]=b; +  } +  ui->fragment = 0; +  url = (string)ui; +  +  if( (int)opts->nobind ) +  { +  report_warning( +  LOC_M(0,"Not binding the port %O, disabled in configuration")+"\n", +  url ); +  return 0; +  }    url = replace( url, "/ANY", "/*" );    url = replace( url, "/any", "/*" );   
1831:       if (is_ip(host))    required_hosts = ({ host }); +  else if( is_ip(opts->ip) ) +  required_hosts = ({ opts->ip });    else    required_hosts = find_ips_for( host );   
4180:      int is_ip(string s)   { -  return (sscanf(s,"%*d.%*d.%*d.%*d")==4 && s[-1]>47 && s[-1]<58); +  return s&&(sscanf(s,"%*d.%*d.%*d.%*d")==4 && s[-1]>47 && s[-1]<58);   }      static string _sprintf( )