jim 98/08/11 08:37:54
Modified: htdocs/manual/mod core.html directives.html mod_status.html src/main http_core.c src/modules/standard mod_status.c Log: Move the ExtendedStatus option to mod_status Revision Changes Path 1.130 +0 -35 apache-1.3/htdocs/manual/mod/core.html Index: core.html =================================================================== RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v retrieving revision 1.129 retrieving revision 1.130 diff -u -r1.129 -r1.130 --- core.html 1998/08/11 00:24:27 1.129 +++ core.html 1998/08/11 15:37:49 1.130 @@ -38,7 +38,6 @@ <LI><A HREF="#documentroot">DocumentRoot</A> <LI><A HREF="#errordocument">ErrorDocument</A> <LI><A HREF="#errorlog">ErrorLog</A> -<LI><A HREF="#extendedstatus">ExtendedStatus</A> <LI><A HREF="#files"><Files></A> <LI><A HREF="#filesmatch"><FilesMatch></A> <LI><A HREF="#group">Group</A> @@ -845,40 +844,6 @@ <P><STRONG>See also:</STRONG> <A HREF="#loglevel">LogLevel</A> <P><HR> - -<H2><A NAME="extendedstatus">ExtendedStatus directive</A></H2> -<!--%plaintext <?INDEX {\tt ExtendedStatus} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ExtendedStatus <EM>On|Off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ExtendedStatus Off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config <BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ExtendedStatus is only available - in Apache 1.3 and later - -<P> -This directive controls whether the server keeps track of extended -status information for each request. This is only useful if the status module -is enabled on the server. -</P> -<P> -This setting applies to the entire server, and cannot be enabled or -disabled on a virtualhost-by-virtualhost basis. -</P><HR> <H2><A NAME="files"><Files> directive</A></H2> <A 1.49 +1 -1 apache-1.3/htdocs/manual/mod/directives.html Index: directives.html =================================================================== RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/directives.html,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- directives.html 1998/08/11 00:24:28 1.48 +++ directives.html 1998/08/11 15:37:50 1.49 @@ -100,7 +100,7 @@ <LI><A HREF="mod_expires.html#expiresactive">ExpiresActive</A> <LI><A HREF="mod_expires.html#expiresbytype">ExpiresByType</A> <LI><A HREF="mod_expires.html#expiresdefault">ExpiresDefault</A> -<LI><A HREF="core.html#extendedstatus">ExtendedStatus</A> +<LI><A HREF="mod_status.html#extendedstatus">ExtendedStatus</A> <LI><A HREF="mod_autoindex.html#fancyindexing">FancyIndexing</A> <LI><A HREF="core.html#files"><Files></A> <LI><A HREF="core.html#filesmatch"><FilesMatch></A> 1.13 +38 -15 apache-1.3/htdocs/manual/mod/mod_status.html Index: mod_status.html =================================================================== RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_status.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- mod_status.html 1998/08/11 00:24:28 1.12 +++ mod_status.html 1998/08/11 15:37:50 1.13 @@ -47,6 +47,44 @@ the instrumentation required for obtaining these statistics does not exist within standard Apache. +<H2><A NAME="extendedstatus">ExtendedStatus directive</A></H2> +<!--%plaintext <?INDEX {\tt ExtendedStatus} directive> --> +<A + HREF="directive-dict.html#Syntax" + REL="Help" +><STRONG>Syntax:</STRONG></A> ExtendedStatus <EM>On|Off</EM><BR> +<A + HREF="directive-dict.html#Default" + REL="Help" +><STRONG>Default:</STRONG></A> <CODE>ExtendedStatus Off</CODE><BR> +<A + HREF="directive-dict.html#Context" + REL="Help" +><STRONG>Context:</STRONG></A> server config <BR> +<A + HREF="directive-dict.html#Status" + REL="Help" +><STRONG>Status:</STRONG></A> Base<BR> + <A + HREF="directive-dict.html#Module" + REL="Help" + ><STRONG>Module:</STRONG></A> mod_status<BR> +<A + HREF="directive-dict.html#Compatibility" + REL="Help" +><STRONG>Compatibility:</STRONG></A> ExtendedStatus is only available + in Apache 1.3 and later + +<P> +This directive controls whether the server keeps track of extended +status information for each request. This is only useful if the status module +is enabled on the server. +</P> +<P> +This setting applies to the entire server, and cannot be enabled or +disabled on a virtualhost-by-virtualhost basis. +</P> + <H2>Enabling Status Support</H2> To enable status reports only for browsers from the foo.com @@ -78,21 +116,6 @@ page <CODE>http://your.server.name/server-status?auto</CODE>. This is useful when automatically run, see the Perl program in the <CODE>/support</CODE> directory of Apache, <CODE>log_server_status</CODE>. - -<H2>Full Instrumentation</H2> - -To obtain full statistics you must compile Apache with a special -directive. On some machines there may be a small performance loss -if you do this. Try full statistics and see if you notice any -difference. If you do please contact <A HREF="mailto:[EMAIL PROTECTED]"> [EMAIL PROTECTED]</A> and tell us your configuration. - -<P> - -Do this by using the following run-time directive: -<PRE> - ExtendedStatus On -</PRE> <BLOCKQUOTE> <STRONG> 1.224 +0 -22 apache-1.3/src/main/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.223 retrieving revision 1.224 diff -u -r1.223 -r1.224 --- http_core.c 1998/08/11 09:26:23 1.223 +++ http_core.c 1998/08/11 15:37:52 1.224 @@ -2313,26 +2313,6 @@ return NULL; } -/* - * Here, and not in the status module, because we want this GLOBAL_ONLY. - * Note that if enabled, there is a nasty performance hit, even if - * the status module is NOT loaded. - */ -static const char *set_extended_status(cmd_parms *cmd, void *dummy, char *arg) -{ - const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); - if (err != NULL) { - return err; - } - if (!strcasecmp(arg, "off") || !strcmp(arg, "0")) { - ap_extended_status = 0; - } - else { - ap_extended_status = 1; - } - return NULL; -} - static const char *set_limit_req_line(cmd_parms *cmd, void *dummy, char *arg) { const char *err = ap_check_cmd_context(cmd, @@ -2618,8 +2598,6 @@ #endif { "ServerTokens", set_serv_tokens, NULL, RSRC_CONF, TAKE1, "Determine tokens displayed in the Server: header - Min(imal), OS or Full" }, -{ "ExtendedStatus", set_extended_status, NULL, RSRC_CONF, TAKE1, - "\"On\" to enable extended status information, \"Off\" to disable" }, { "LimitRequestLine", set_limit_req_line, NULL, RSRC_CONF, TAKE1, "Limit on maximum size of an HTTP request line"}, { "LimitRequestFieldsize", set_limit_req_fieldsize, NULL, RSRC_CONF, TAKE1, 1.94 +28 -1 apache-1.3/src/modules/standard/mod_status.c Index: mod_status.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_status.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- mod_status.c 1998/08/11 00:09:48 1.93 +++ mod_status.c 1998/08/11 15:37:53 1.94 @@ -95,6 +95,7 @@ * [Jim J.] */ +#define CORE_PRIVATE #include "httpd.h" #include "http_config.h" #include "http_core.h" @@ -130,6 +131,32 @@ module MODULE_VAR_EXPORT status_module; +/* + *command-related code. This is here to prevent use of ExtendedStatus + * without status_module included. + */ +static const char *set_extended_status(cmd_parms *cmd, void *dummy, char *arg) +{ + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + if (err != NULL) { + return err; + } + if (!strcasecmp(arg, "off") || !strcmp(arg, "0")) { + ap_extended_status = 0; + } + else { + ap_extended_status = 1; + } + return NULL; +} + +static const command_rec status_module_cmds[] = +{ + { "ExtendedStatus", set_extended_status, NULL, RSRC_CONF, TAKE1, + "\"On\" to enable extended status information, \"Off\" to disable" }, + {NULL} +}; + /* Format the number of bytes nicely */ static void format_byte_out(request_rec *r, unsigned long bytes) { @@ -696,7 +723,7 @@ NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - NULL, /* command table */ + status_module_cmds, /* command table */ status_handlers, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */