Received: (qmail 27214 invoked by uid 2012); 15 Apr 1999 00:06:15 -0000 Message-Id: <19990415000615.27213.qmail@hyperreal.org> Date: 15 Apr 1999 00:06:15 -0000 From: Raymond S Brand Reply-To: rsbx@intnet.net To: apbugs@hyperreal.org Subject: ServerSignature directive only effective in main server config. X-Send-Pr-Version: 3.2 >Number: 4248 >Category: config >Synopsis: ServerSignature directive only effective in main server config. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Apr 14 17:10:03 PDT 1999 >Last-Modified: Wed Apr 28 06:00:16 PDT 1999 >Originator: rsbx@intnet.net >Organization: >Release: 1.3.6 >Environment: Linux redhat52 2.0.36 #1 Sat Mar 27 13:08:43 EST 1999 i686 unknown gcc version 2.7.2.3 >Description: The ServerSignature directive is documented as working in the server config, virtual host, directory, .htaccess contexts but only has an effect when used in teh server config context. >How-To-Repeat: My test setup uses the fourth of four named virtual hosts on one ip/post. If needed I can provide the config.status and httpd.conf files. >Fix: >Audit-Trail: From: Raymond S Brand To: apbugs@Apache.Org Cc: rsbx@intnet.net Subject: Re: config/4248: ServerSignature directive only effective in main server config. Date: Thu, 22 Apr 1999 13:25:37 -0400 The following patch makes the ServerSignature directive work as documented. Please include this in 1.3.7, if possible. Raymond S Brand P.S. Please use rsbx@intnet.net for correspondence. diff -ur apache_1.3.6-orig/src/include/http_core.h apache_1.3.6-rsbx/src/include/http_core.h --- apache_1.3.6-orig/src/include/http_core.h Wed Mar 10 15:18:55 1999 +++ apache_1.3.6-rsbx/src/include/http_core.h Thu Apr 22 12:54:27 1999 @@ -251,7 +251,8 @@ unsigned long limit_req_body; /* limit on bytes in request msg body */ /* logging options */ - enum { srv_sig_off, srv_sig_on, srv_sig_withmail } server_signature; + enum { srv_sig_unset, srv_sig_off, srv_sig_on, + srv_sig_withmail } server_signature; int loglevel; /* Access control */ diff -ur apache_1.3.6-orig/src/main/http_core.c apache_1.3.6-rsbx/src/main/http_core.c --- apache_1.3.6-orig/src/main/http_core.c Fri Mar 19 18:54:08 1999 +++ apache_1.3.6-rsbx/src/main/http_core.c Thu Apr 22 13:02:09 1999 @@ -148,6 +148,9 @@ #ifdef WIN32 conf->script_interpreter_source = INTERPRETER_SOURCE_UNSET; #endif + + conf->server_signature = srv_sig_unset; + return (void *)conf; } @@ -271,6 +274,10 @@ } #endif + if (new->server_signature != srv_sig_unset) { + conf->server_signature = new->server_signature; + } + return (void*)conf; } @@ -2483,7 +2490,8 @@ conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); - if (conf->server_signature == srv_sig_off) { + if ((conf->server_signature == srv_sig_off) + || (conf->server_signature == srv_sig_unset)) { return ""; } -- State-Changed-From-To: open-closed State-Changed-By: martin State-Changed-When: Wed Apr 28 06:00:16 PDT 1999 State-Changed-Why: Thanks for your patch. I have committed it for apache 1.3.7 >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]