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 - 2004, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.611 2006/06/21 11:02:59 grubba Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.612 2006/06/30 09:10:44 grubba 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:271:    function(string, RequestID:string) val;    if (arrayp(val = cache[key_prefix])) {    current_size -= sizeof(val[0]);    m_delete(cache, key_prefix);    return;    }    if (!val) {    return;    }    -  string key_frag; +  string|array(string) key_frag;    if (stringp(val)) {    key_frag = id->request_headers[val];    } else {    key_frag = val(url, id);    } -  +  if (arrayp(key_frag)) keyfrag *= ", ";    // NOTE: The prepended NUL is for spoof protection.    key_prefix = "\0" + key_prefix + "\0" + (key_frag || "");    }    }       static void clear_some_cache()    {    array(string) q = indices(cache);    if(!sizeof(q))    {
Roxen.git/server/base_server/configuration.pike:310:    foreach(id->misc->vary_cb_order || ({}),    string|function(string, RequestID: string) vary_cb) {    array(string|mapping(string:mixed))|string|    function(string, RequestID:string) old = cache[key];    if (old && (old != vary_cb)) {    // FIXME: Warn?    expire_entry(key);    }    cache[key] = vary_cb;    -  string key_frag; +  string|array(string) key_frag;    if (stringp(vary_cb)) {    key_frag = id->request_headers[vary_cb];    } else {    key_frag = vary_cb(url, id);    } -  +  if (arrayp(key_frag)) keyfrag *= ", ";    // NOTE: The prepended NUL is for spoof protection.    key = "\0" + key + "\0" + (key_frag || "");    }       array(string|mapping(string:mixed))|string|    function(string, RequestID:string) old = cache[key];    if (old) {    // FIXME: Warn?    expire_entry(key);    }
Roxen.git/server/base_server/configuration.pike:353:    id->misc->protcache_cost++;    if (arrayp(res = cache[key])) {    hits++;    return [array(string|mapping(string:mixed))]res;    }    if (!res) {    misses++;    return UNDEFINED;    }    -  string key_frag; +  string|array(string) key_frag;    if (stringp(res)) {    key_frag = id->request_headers[res];    } else {    key_frag = res(url, id);    } -  +  if (arrayp(key_frag)) keyfrag *= ", ";    // NOTE: The prepended NUL is for spoof protection.    key = "\0" + key + "\0" + (key_frag || "");    };    }       void init_from_variables( )    {    max_size = query( "data_cache_size" ) * 1024;    max_file_size = query( "data_cache_file_max_size" ) * 1024;    if( max_size < max_file_size )