Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // This file is part of Internet Server.   // Copyright © 1996 - 2001, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.525 2002/06/15 21:03:54 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.526 2002/06/18 16:16:22 nilsson 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)      #ifdef THROTTLING_DEBUG   #undef THROTTLING_DEBUG
Roxen.git/server/base_server/configuration.pike:1266:    res += "? bytes ";       if (m->data) res += "(static)";    else if (m->file) res += "(open file)";       if (stringp(m->extra_heads["content-type"]) ||    stringp(m->type)) {    res += sprintf(" of %s", m->type||m->extra_heads["content-type"]);    }    -  res+="<br />"; -  +     return res;   }      mapping|int(-1..0) low_get_file(RequestID id, int|void no_magic)   //! The function that actually tries to find the data requested. All   //! modules except last and filter type modules are mapped, in order,   //! and the first one that returns a suitable response is used. If   //! `no_magic' is set to one, the internal magic roxen images and the   //! <ref>find_internal()</ref> callbacks will be ignored.   //!
Roxen.git/server/base_server/configuration.pike:2233:    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:2302:       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;