Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: configuration.pike,v 1.333 2000/08/12 21:47:26 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.334 2000/08/13 00:23:29 per Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>      inherit "basic_defvar";      mapping enabled_modules = ([]);   mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/configuration.pike:1262:    TRACE_LEAVE("");    }    }       // Well, this just _might_ be somewhat over-optimized, since it is    // quite unreadable, but, you cannot win them all..    if(!fid)    {   #ifdef URL_MODULES    // Map URL-modules -  foreach(url_modules(id), funp) +  foreach(url_module_cache||url_modules(id), funp)    {    LOCK(funp);    TRACE_ENTER("URL module", funp);    tmp=funp( id, file );    UNLOCK();       if(mappingp(tmp))    {    TRACE_LEAVE("");    TRACE_LEAVE("Returning data");
Roxen.git/server/base_server/configuration.pike:1300: Inside #if defined(URL_MODULES)
   nest = 0;    if(err) throw(err);    TRACE_LEAVE("");    TRACE_LEAVE("Returning data");    return tmp;    }    TRACE_LEAVE("");    }   #endif    -  foreach(location_modules(id), tmp) +  foreach(location_module_cache||location_modules(id), tmp)    {    loc = tmp[0];    if(!search(file, loc))    {    TRACE_ENTER(sprintf("Location module [%s] ", loc), tmp[1]);   #ifdef MODULE_LEVEL_SECURITY    if(tmp2 = check_security(tmp[1], id, slevel))    if(intp(tmp2))    {    TRACE_LEAVE("Permission to access module denied.");
Roxen.git/server/base_server/configuration.pike:1465:    : "Missing type.");    if(tmp)    {    TRACE_LEAVE("");    return ([ "file":fid, "type":tmp[0], "encoding":tmp[1] ]);    }    TRACE_LEAVE("");    return ([ "file":fid, ]);    }    if(!fid) -  { +     TRACE_LEAVE("Returned 'no such file'."); -  } +     else    TRACE_LEAVE("Returning data");    return fid;   }    -  +    mixed handle_request( RequestID id )   {    function funp;    mixed file; -  +     REQUEST_WERR("handle_request()"); -  foreach(first_modules(id), funp) +  foreach(first_module_cache||first_modules(id), funp)    {    if(file = funp( id ))    break;    if(id->conf != this_object()) {    REQUEST_WERR("handle_request(): Redirected (2)");    return id->conf->handle_request(id);    }    }    if(!mappingp(file) && !mappingp(file = get_file(id)))    {    mixed ret; -  foreach(last_modules(id), funp) if(ret = funp(id)) break; +  foreach(last_module_cache||last_modules(id), funp) if(ret = funp(id)) break;    if (ret == 1) {    REQUEST_WERR("handle_request(): Recurse");    return handle_request(id);    }    file = ret;    }    REQUEST_WERR("handle_request(): Done");    return file;   }   
Roxen.git/server/base_server/configuration.pike:1516:    id->misc->internal_get = internal_get;       mapping|int res;    mapping res2;    function tmp;    res = low_get_file(id, no_magic);       // finally map all filter type modules.    // Filter modules are like TYPE_LAST modules, but they get called    // for _all_ files. -  foreach(filter_modules(id), tmp) +  foreach(filter_module_cache||filter_modules(id), tmp)    {    TRACE_ENTER("Filter module", tmp);    if(res2=tmp(res,id))    {    if(res && res->file && (res2->file != res->file))    destruct(res->file);    TRACE_LEAVE("Rewrote result.");    res=res2;    } else    TRACE_LEAVE("");