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.425 2001/04/17 07:21:38 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.426 2001/04/18 04:25:08 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)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:2981:   }      DataCache datacache;      static void create(string config)   {    name=config;   // int st = gethrtime();    roxen.add_permission( "Site:"+config, LOC_C(306,"Site")+": "+config );    -  // for now only theese two. In the future there might be more variables. +  // for now only these two. In the future there might be more variables.    defvar( "data_cache_size", 2048, DLOCALE(274, "Cache:Cache size"),    TYPE_INT| VAR_PUBLIC,    DLOCALE(275, "The size of the data cache used to speed up requests "    "for commonly requested files, in KBytes"));       defvar( "data_cache_file_max_size", 50, DLOCALE(276, "Cache:Max file size"),    TYPE_INT | VAR_PUBLIC,    DLOCALE(277, "The maximum size of a file that is to be considered for "    "the cache"));   
Roxen.git/server/base_server/configuration.pike:3011:    TYPE_TEXT_FIELD|VAR_MORE,    DLOCALE(23, "This text will be visible in the administration "    "interface, it can be quite useful to use as a memory helper."));       defvar("name", "", DLOCALE(24, "Site name"),    TYPE_STRING|VAR_MORE| VAR_PUBLIC,    DLOCALE(25, "This is the name that will be used in the administration "    "interface. If this is left empty, the actual name of the "    "site will be used."));    +  defvar("compat_level", Variable.StringChoice ( +  "", roxen.compat_levels, 0, +  DLOCALE(0, "Compatibility level"), +  DLOCALE(0, ""))); +  set ("compat_level", roxen.__roxen_version__); +     defvar("LogFormat",    "404: $host $referer - [$cern_date] \"$method $resource $protocol\" 404 -\n"    "500: $host $referer ERROR [$cern_date] \"$method $resource $protocol\" 500 -\n"    "*: $host - - [$cern_date] \"$method $resource $protocol\" $response $length",    DLOCALE(26, "Logging: Format"),    TYPE_TEXT_FIELD|VAR_MORE,    DLOCALE(27, "What format to use for logging. The syntax is:\n"    "<pre>"    "response-code or *: Log format for that response code\n\n"    "Log format is normal characters, or one or more of the "
Roxen.git/server/base_server/configuration.pike:3273:   ",    DLOCALE(58, "No such file message"),    TYPE_TEXT_FIELD|VAR_PUBLIC,    DLOCALE(59, "What to return when there is no resource or file "    "available at a certain location."));       definvisvar( "no_delayed_load", 0, TYPE_FLAG|VAR_PUBLIC );      // report_debug("[defvar: %.1fms] ", (gethrtime()-st)/1000.0 );   // st = gethrtime(); -  setvars( retrieve("spider#0", this_object()) ); +     -  +  mapping(string:mixed) retrieved_vars = retrieve("spider#0", this_object()); +  if (sizeof (retrieved_vars) && !retrieved_vars->compat_level) +  // Upgrading an older configuration; default to 2.1 compatibility level. +  set ("compat_level", "2.1"); +  setvars( retrieved_vars ); +    // report_debug("[restore: %.1fms] ", (gethrtime()-st)/1000.0 );    if (query("throttle"))    {    throttler=.throttler();    throttler->throttle(query("throttle_fill_rate"),    query("throttle_bucket_depth"),    query("throttle_min_grant"),    query("throttle_max_grant"));    }   }      static int arent_we_throttling_server () {    return !query("throttle");   }   static int arent_we_throttling_request() {    return !query("req_throttle");   }