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.379 2000/10/06 15:12:34 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.380 2000/10/29 03:40:56 mast 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:114:       array (RoxenModule) url_modules = ({ });    array (RoxenModule) logger_modules = ({ });    array (RoxenModule) location_modules = ({ });    array (RoxenModule) filter_modules = ({ });    array (RoxenModule) last_modules = ({ });    array (RoxenModule) first_modules = ({ });    mapping (string:array(RoxenModule)) file_extension_modules = ([ ]);    mapping (RoxenModule:multiset(string)) provider_modules = ([ ]);    -  void stop() +  array(RoxenModule) stop()    {    foreach(url_modules, RoxenModule m)    CATCH("stopping url modules",m->stop && m->stop());    foreach(logger_modules, RoxenModule m)    CATCH("stopping logging modules",m->stop && m->stop());    foreach(filter_modules, RoxenModule m)    CATCH("stopping filter modules",m->stop && m->stop());    foreach(location_modules, RoxenModule m)    CATCH("stopping location modules",m->stop && m->stop());    foreach(last_modules, RoxenModule m)    CATCH("stopping last modules",m->stop && m->stop());    foreach(first_modules, RoxenModule m)    CATCH("stopping first modules",m->stop && m->stop());    foreach(indices(provider_modules), RoxenModule m)    CATCH("stopping provider modules",m->stop && m->stop()); -  +  return url_modules + logger_modules + filter_modules + location_modules + +  last_modules + first_modules + indices (provider_modules);    }   }            /* A 'pri' is one of the ten priority objects. Each one holds a list    * of modules for that priority. They are all merged into one list for    * performance reasons later on.    */   
Roxen.git/server/base_server/configuration.pike:193:   private array (function) logger_module_cache, first_module_cache;   private array (function) filter_module_cache;   private array (array (string|function)) location_module_cache;   private mapping (string:array (function)) file_extension_module_cache=([]);   private mapping (string:array (RoxenModule)) provider_module_cache=([]);         // Call stop in all modules.   void stop()   { +  multiset allmods = mkmultiset (indices (otomod));    CATCH("stopping type modules",    types_module && types_module->stop && types_module->stop()); -  +  allmods[types_module] = 0;    CATCH("stopping auth module",    auth_module && auth_module->stop && auth_module->stop()); -  +  allmods[auth_module] = 0;    CATCH("stopping directory module",    dir_module && dir_module->stop && dir_module->stop()); -  +  allmods[dir_module] = 0;    for(int i=0; i<10; i++)    CATCH("stopping priority group", -  (pri[i] && pri[i]->stop && pri[i]->stop())); +  (pri[i] && pri[i]->stop && (allmods -= mkmultiset (pri[i]->stop()))));    CATCH("stopping the logger",    log_function && lambda(mixed m){    destruct(m); -  +  allmods[m] = 0;    }(function_object(log_function))); -  +  foreach (indices (allmods), RoxenModule m) +  CATCH ("stopping unclassified module", +  m && m->stop && m->stop());    foreach( registered_urls, string url )    roxen.unregister_url(url);   }      public string type_from_filename( string file, int|void to, string|void myext )   {    array(string)|string tmp;    if(!types_fun)    return to?({ "application/octet-stream", 0 }):"application/octet-stream";