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.501 2002/06/10 16:55:24 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.502 2002/06/17 09:36:13 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:2204:    if(check_security(tmp[1], id)) continue;   #endif    if(s=function_object(tmp[1])->real_file(file[strlen(loc)..], id))    return s;    }    }   }      int|string try_get_file(string s, RequestID id,    int|void status, int|void nocache, -  int|void not_internal) +  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.   //!   //! Unless the not_internal flag is set, this tries to get an external   //! or internal file. Here "internal" means a file that never should be   //! sent directly as a request response. E.g. an internal redirect to a   //! different file is still considered "external" since its contents is
Roxen.git/server/base_server/configuration.pike:2273:       CACHE( fake_id->misc->cacheable );    destruct (fake_id);       if (!mappingp(m) && !objectp(m)) {    report_error("try_get_file(%O, %O, %O, %O): m = %O is not a mapping.\n",    s, id, status, nocache, m);    return 0;    }    +  if (result_mapping) +  foreach(indices(m), string i) +  result_mapping[i] = m[i]; +     // Allow 2* and 3* error codes, not only a few specific ones.    if (!(< 0,2,3 >)[m->error/100]) return 0;       if(status) return 1;       if(m->data)    res = m->data;    else    res="";    m->data = 0;