Roxen.git / server / base_server / global_variables.pike

version» Context lines:

Roxen.git/server/base_server/global_variables.pike:1:   // This file is part of Roxen Webserver.   // Copyright © 1996 - 2000, Roxen IS. - // $Id: global_variables.pike,v 1.60 2001/01/19 12:41:33 per Exp $ + // $Id: global_variables.pike,v 1.61 2001/01/21 17:45:05 nilsson Exp $      /*   #pragma strict_types   */   #define DEFVAR mixed...:object   #define BDEFVAR mixed...:object      #define IN_ROXEN   #include <module.h>   inherit "read_config";
Roxen.git/server/base_server/global_variables.pike:31:   private int(0..1) ident_disabled_p() { return [int(0..1)]query("default_ident"); }         // And why put these functions here, you might righfully ask.      // The answer is that there is actually a reason for it, it's for   // performance reasons. This file is dumped to a .o file, roxen.pike   // is not.   void set_up_hilfe_variables( Protocol o )   { -  function(DEFVAR) defvar = [function(DEFVAR)] o->defvar; +  function(DEFVAR) defvar = o->defvar;       defvar( "require_auth", 1,    LOCALE(309,"Require user with the 'hilfe' permission"), TYPE_FLAG,    LOCALE(310,"If yes, require a user with the hilfe permission "    "set, otherwise, any configuration interface user will "    "work, even one with only the view settings permission" ) );   }         void set_up_ftp_variables( Protocol o )   { -  function(DEFVAR) defvar = -  [function(DEFVAR)] o->defvar; +  function(DEFVAR) defvar = o->defvar;          defvar( "FTPWelcome",    " +------------------------------------------------\n"    " +-- Welcome to the Roxen FTP server ---\n"    " +------------------------------------------------\n",    LOCALE(60, "Welcome text"), TYPE_TEXT,    LOCALE(61, "The text shown to the user on connect") );       defvar( "ftp_user_session_limit", 0, LOCALE(62, "User session limit"),
Roxen.git/server/base_server/global_variables.pike:84:    TYPE_FILE,    LOCALE(71, "If this string is set to anything but the empty string, "    "it should point to a file containing a list of valid shells. "    "Users with shells that does not figure in this list will not "    "be allowed to log in.") );   }         void set_up_http_variables( Protocol o, int|void fhttp )   { -  function(DEFVAR) defvar = -  [function(DEFVAR)] o->defvar; +  function(DEFVAR) defvar = o->defvar;       defvar("show_internals", 1, LOCALE(72, "Show internal errors"),    TYPE_FLAG,    LOCALE(73, "Show 'Internal server error' messages to the user. "    "This is very useful if you are debugging your own modules "    "or writing Pike scripts."));       if(!fhttp)    {    defvar("set_cookie", 0, LOCALE(74, "Logging: Set unique user id cookies"),
Roxen.git/server/base_server/global_variables.pike:116:    "ID cookies only upon receiving the first request (and "    "again after some minutes). Thus, if the user doesn't allow "    "the cookie to be set, she won't be bothered with "    "multiple requests."),0 ,    lambda() {return !query("set_cookie");});    }   }      void set_up_fhttp_variables( Protocol o )   { -  function(BDEFVAR) defvar = -  [function(BDEFVAR)] o->defvar; +  function(BDEFVAR) defvar = o->defvar;       defvar( "log", "None", LOCALE(78, "Logging method"),    TYPE_STRING_LIST,    LOCALE(79, "None - No log<br />"    "CommonLog - A common log in a file<br />"    "Compat - Log through Roxen's normal logging format.<br />"    "<p>Please note that compat limits Roxen to less than 1k "    "requests/second.</p>"),    ({ "None", "CommonLog", "Compat" }));    -  defvar( "log_file", "$LOGDIR/clog-"+[string]o->ip+":"+[string]o->port, +  defvar( "log_file", "$LOGDIR/clog-"+o->ip+":"+o->port,    LOCALE(80, "Log file"),    TYPE_FILE,    LOCALE(81, "This file is used if logging is done using the "    "CommonLog method."));       defvar( "ram_cache", 20, LOCALE(82, "Ram cache"),    TYPE_INT,    LOCALE(83, "The size of the ram cache, in MegaBytes"));       defvar( "read_timeout", 120, LOCALE(84, "Client timeout"),    TYPE_INT,    LOCALE(85, "The maximum time Roxen will wait for a client "    "before giving up, and close the connection, in seconds"));       set_up_http_variables( o,1 );      }      void set_up_ssl_variables( Protocol o )   { -  function(DEFVAR) defvar = -  [function(DEFVAR)] o->defvar; +  function(DEFVAR) defvar = o->defvar;       defvar( "ssl_cert_file", "demo_certificate.pem",    LOCALE(86, "SSL certificate file"),    TYPE_STRING,    sprintf(LOCALE(87, "The SSL certificate file to use. The path "    "is relative to %s")+"\n", getcwd() ));          defvar( "ssl_key_file", "", LOCALE(88, "SSL key file"),    TYPE_STRING,