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.707 2010/11/17 19:05:20 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.708 2010/12/01 22:07:27 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:3118:       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 +  // much in a response mapping. In particular, the http protocol +  // module doesn't look at it. +  // +  // Maybe we should read in the result and decode it using this +  // charset instead, just like we do in the m->raw case below.    result_mapping->charset = charset;    result_mapping->last_modified = fake_id->misc->last_modified;    }       if(a[0]) {    m->file = a[0];    }    else {    destruct (fake_id);    return 0;
Roxen.git/server/base_server/configuration.pike:3142:       // Allow 2* and 3* error codes, not only a few specific ones.    if (!(< 0,2,3 >)[m->error/100]) return 0;       if(stat_only) return 1;       if(m->data)    res = m->data;    else    res=""; -  m->data = 0; +        if( objectp(m->file) )    {    res += m->file->read();    if (m->file) {    // Some wrappers may destruct themselves in read()...    destruct(m->file);    } -  m->file = 0; +     }       if(m->raw) -  { -  res -= "\r"; -  if(!sscanf(res, "%*s\n\n%s", res)) -  sscanf(res, "%*s\n%s", res); -  } +  res = Roxen.parse_http_response (res, result_mapping, 0, "from " + s);    return res;   }      mapping(string:string) try_get_headers(string s, RequestID id,    int|void not_internal)   //! Like @[try_get_file] but performs a HEAD request and only returns   //! the response headers. Note that the returned headers are as they   //! would be in a formatted response by the http protocol module,   //! which is completely different from a response mapping.   {