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 - 2009, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.717 2011/05/20 12:21:59 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.718 2011/05/24 13:54:34 mast 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)      // Tell Pike.count_memory this is global.   constant pike_cycle_depth = 0;
Roxen.git/server/base_server/configuration.pike:3112:   //! sent directly to the client. Internal requests are recognized by   //! the id->misc->internal_get flag being non-zero.   {    string res;    RequestID fake_id = make_fake_id (s, id);    mapping m;       fake_id->misc->internal_get = !not_internal;    fake_id->method = "GET";    -  // Stash the rxml context if we have any, to keep code in the nested -  // request from modifying it. E.g. RequestID.set_max_cache, -  // RequestID.add_response_header and RequestID.set_output_charset -  // may otherwise record changes in our context if there's no nested -  // rxml session when they are called. -  RXML.Context old_ctx = RXML.get_context(); -  RXML.set_context (0); +  array a = open_file( fake_id->not_query, "r", fake_id, !not_internal );    -  array a; -  mixed err = catch { -  a = open_file( fake_id->not_query, "r", fake_id, !not_internal ); -  }; -  -  RXML.set_context (old_ctx); -  if (err) throw (err); -  +     m = a[1];       // Propagate vary callbacks from the subrequest.    id->propagate_vary_callbacks(fake_id);       if (result_mapping) {    foreach(indices(m), string i)    result_mapping[i] = m[i];    if (string|function(string:string) charset = fake_id->get_output_charset())    // Note that a "charset" field currently isn't supported very