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.330 2000/08/01 16:27:12 jhs Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.331 2000/08/08 12:12:31 jhs 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:2020: Inside #if defined(MODULE_LEVEL_SECURITY)
  #ifdef MODULE_LEVEL_SECURITY    if(check_security(tmp[1], id)) continue;   #endif    if(s=function_object(tmp[1])->access(file[strlen(loc)..], id))    return s;    }    }    return 0;   }    - // Return the _real_ filename of a virtual file, if any. -  +    public string real_file(string file, RequestID id) -  + //! Return the _real_ filename of a virtual file, if any.   {    string loc;    string s;    array tmp;    file=replace(file, "//", "/"); // "//" is really "/" here...       if(!id) error("No id passed to real_file");       // Map location-modules.    foreach(location_modules(id), tmp)
Roxen.git/server/base_server/configuration.pike:2151:    {    res -= "\r";    if(!sscanf(res, "%*s\n\n%s", res))    sscanf(res, "%*s\n%s", res);    }    if (cache_key)    cache_set("file:"+name, cache_key, res);    return res;   }    - // Is 'what' a file in our virtual filesystem? - int(0..1) is_file(string what, RequestID id) + int(0..1) is_file(string virt_path, RequestID id) + //! Is `virt_path' a file in our virtual filesystem?   { -  return !!stat_file(what, id); +  return !!stat_file(virt_path, id);   }      array registered_urls = ({});   void start(int num)   {    // Note: This is run as root if roxen is started as root    foreach( query( "URLs" )-registered_urls, string url )    {    registered_urls += ({ url });    roxenp()->register_url( url, this_object() );
Roxen.git/server/base_server/configuration.pike:2772:    m_delete( enabled_modules, modname + "#" + id );    forcibly_added[ modname + "#" + id ] = 0;    store( "EnabledModules",enabled_modules, 1, this_object());    }    if(!nodest)    destruct(me);    return 1;   }      RoxenModule|string find_module(string name) + //! Return the module corresponding to the name (eg "rxmlparse", + //! "rxmlparse#0" or "filesystem#1") or zero, if there was no such + //! module.   {    int id;    sscanf(name, "%s#%d", name, id);    if(modules[name])    return modules[name]->copies[id];    return 0;   }      multiset forcibly_added = (<>);   int add_modules( array(string) mods, int|void now )