Branch: Tag:

2000-03-27

2000-03-27 04:14:23 by Per Hedbor <ph@opera.com>

Do _not_ default to the default configuration in the ANY port, if no of the URLs match explicitly, use the default (first) URL in the current port instead

Rev: server/base_server/roxen.pike:1.468

4:   // 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.467 2000/03/27 00:08:37 per Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.468 2000/03/27 04:14:23 per Exp $";      object backend_thread;   ArgCache argcache;
698:    }    }    -  object find_configuration_for_url( string url, RequestID id ) +  object find_configuration_for_url( string url, RequestID id, +  int|void no_default )    {    object c;    foreach( sorted_urls, string in )
720:    if( ip    && ( i=open_ports[ name ][ 0 ] )    && ( i=i[ port ] ) -  && ( i != this_object()) ) -  return i->find_configuration_for_url( url, id ); +  && ( i != this_object()) +  && (i = i->find_configuration_for_url( url, id, 1 ))) +  return i;    -  +  if( !no_default ) +  {    // .. then grab the first configuration that is available at all.    if(!(c = urls[sorted_urls[0]]->conf)->inited) c->enable_all_modules();    id->misc->defaulted=1;    return c;    } -  +  return 0; +  }       mixed query_option( string x )    {