Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.526 2002/11/05 17:11:21 anders Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.527 2002/11/05 18:09:54 anders Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>   #include <timers.h>      #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:2259: Inside #if defined(MODULE_LEVEL_SECURITY)
   {   #ifdef MODULE_LEVEL_SECURITY    if(check_security(tmp[1], id)) continue;   #endif    if(s=function_object(tmp[1])->real_file(file[strlen(loc)..], id))    return s;    }    }   }    + array(int)|Stat try_stat_file(string s, RequestID id, int|void not_internal) + { +  RequestID fake_id; +  array(int)|Stat res; +  +  if(!objectp(id)) +  error("No ID passed to 'try_stat_file'\n"); +  +  // id->misc->common is here for compatibility; it's better to use +  // id->root_id->misc. +  if ( !id->misc ) +  id->misc = ([]); +  if ( !id->misc->common ) +  id->misc->common = ([]); +  +  fake_id = id->clone_me(); +  +  fake_id->misc->common = id->misc->common; +  fake_id->misc->internal_get = !not_internal; +  fake_id->conf = this_object(); +  +  if (fake_id->scan_for_query) +  // FIXME: If we're using e.g. ftp this doesn't exist. But the +  // right solution might be that clone_me() in an ftp id object +  // returns a vanilla (i.e. http) id instead when this function is +  // used. +  s = fake_id->scan_for_query (s); +  +  s = Roxen.fix_relative (s, id); +  +  fake_id->raw_url = s; +  fake_id->not_query = s; +  fake_id->method = "GET"; +  +  res = stat_file(fake_id->not_query, fake_id); +  +  destruct (fake_id); +  return res; + } +    int|string try_get_file(string s, RequestID id,    int|void status, int|void nocache,    int|void not_internal,    mapping|void result_mapping)   //! Convenience function used in quite a lot of modules. Tries to read   //! a file into memory, and then returns the resulting string.   //!   //! NOTE: A 'file' can be a cgi script, which will be executed,   //! resulting in a horrible delay.   //!