Branch: Tag:

2000-08-31

2000-08-31 03:16:37 by Per Hedbor <ph@opera.com>

Unified path handling (and c->inited) for less copy-paste errors..

Rev: server/base_server/roxen.pike:1.539
Rev: server/protocols/http.pike:1.264

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.263 2000/08/31 03:00:34 per Exp $"; + constant cvs_version = "$Id: http.pike,v 1.264 2000/08/31 03:16:37 per Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1916:    send_result();   }    + void adjust_for_config_path( string p ) + { +  if( not_query ) not_query = not_query[ strlen(p).. ]; +  raw_url = raw_url[ strlen(p).. ]; +  misc->stite_prefix_path = p; + } +    /* We got some data on a socket.    * =================================================    */
1989:    TIMER("charset");       string path; -  if( !conf || -  !(path = port_obj->path ) -  || (sizeof( path ) && not_query[..sizeof(path) - 1] != path) ) +  if( !conf || !(path = port_obj->path ) +  || (sizeof( path ) +  && not_query[..sizeof(path) - 1] != path) )    {    // FIXME: port_obj->name & port_obj->default_port are constant    // consider caching them?
2004:    this_object());    }    else if( strlen(path) ) -  { -  raw_url = raw_url[strlen(path)..]; -  misc->site_prefix_path = path; -  } +  adjust_for_config_path( path );       TIMER("conf");