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.390 2000/11/02 16:47:11 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.391 2000/11/06 22:10:54 per Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.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:2994:    0, arent_we_throttling_request);       defvar("req_throttle_depth_mult", 60.0,    DLOCALE(56, "Throttling: Request: Bucket Depth Multiplier"),    TYPE_FLOAT,    DLOCALE(57, "The average bandwidth available for each request will be determined by "    "the modules combination. The bucket depth will be determined multiplying "    "the rate by this factor."),    0, arent_we_throttling_request);    -  defvar("ZNoSuchFile", #" +  +  defvar("404-files", ({ "404.inc" }), +  DLOCALE("", "No such file message override files"), +  TYPE_STRING_LIST|VAR_PUBLIC, +  DLOCALE("", +  "If no file match a given resource all directories above the" +  " wanted file is searched for one of the files in this list." +  "<p>\n" +  "As an example, if the file /foo/bar/not_there.html is " +  "wanted, and this list contains the default value of 404.inc," +  " these files will be searched for, in this order:</p><br /> " +  " /foo/bar/404.inc, /foo/404.inc and /404.inc." ) ); +  +  +  +  class NoSuchFileOverride +  { +  // compatibility with old config-files. +  inherit Variable.Variable; +  +  int check_visibility( RequestID id, int more_mode, +  int expert_mode, int devel_mode, +  int initial, int|void variable_in_cfif ) +  { +  return 0; +  } +  +  void set( string newval ) +  { +  if( search(newval,"emit source=values") == -1 ) +  variables[ "404-message" ]->set( newval ); +  } +  +  void create() +  { +  ::create( + #"<nooutput><emit source=values scope=ef variable='modvar.site.404-files'> +  <set variable='var.base' value=''/> +  <emit source='path'> +  <append variable='var.base' value='/&_.name;'/> +  <set variable='var.404' value='&var.base;/&ef.value;'/> +  <if exists='&var.404;'> +  <set variable='var.errfile' from='var.404'/> +  </if> +  </emit> + </emit> + </nooutput><if variable='var.errfile'><eval><insert file='&var.errfile;'/></eval></if><else><eval>&modvar.site.404-message:none;</eval></else>", 0, 0, 0 ); +  } +  }; +  +  defvar("ZNoSuchFile", NoSuchFileOverride() ); +  +  defvar("404-message", #"   <html><head>   <title>404 - Page not found</title>   </head> -  +    <body alink=\"#000000\" bgcolor=\"#ffffff\" bottommargin=\"0\" leftmargin=\"0\" link=\"#ce5c00\" marginheight=\"2\" marginwidth=\"0\" rightmargin=\"0\" text=\"#333333\" topmargin=\"2\" vlink=\"#ce5c00\">      <if nserious=''><set variable='var.404' value='-sorry' /></if>      <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">    <tr>    <td><img src=\"/internal-roxen-page-not-found&var.404;\" border=\"0\" alt=\"Page not found\" width=\"404\" hspace=\"2\" /></td>    <td>&nbsp;</td>    <td align=\"right\"><font face=\"lucida,helvetica,arial\">    <b>Roxen WebServer &roxen.base-version;</b></font></td>
Roxen.git/server/base_server/configuration.pike:3034:   <a href=\"&client.referrer;\">referring</a>   </if><else>   referring   </else>   page.      </blockquote>   </font>   </body>   ", -  DLOCALE(58, "No such file message"),TYPE_TEXT_FIELD, +  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 );       setvars( retrieve("spider#0", this_object()) );       if (query("throttle"))    {    throttler=.throttler();