martin 99/04/28 01:35:32
Modified: src/include http_core.h src/main http_core.c Log: Fixed the ServerSignature directive to work as documented. PR: 4248 Submitted by: Raymond S Brand <[EMAIL PROTECTED]> Reviewed by: Martin Kraemer Revision Changes Path 1.56 +2 -1 apache-1.3/src/include/http_core.h Index: http_core.h =================================================================== RCS file: /home/cvs/apache-1.3/src/include/http_core.h,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- http_core.h 1999/03/10 20:18:55 1.55 +++ http_core.h 1999/04/28 08:35:08 1.56 @@ -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 */ 1.260 +10 -2 apache-1.3/src/main/http_core.c Index: http_core.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.259 retrieving revision 1.260 diff -u -r1.259 -r1.260 --- http_core.c 1999/04/20 17:03:27 1.259 +++ http_core.c 1999/04/28 08:35:31 1.260 @@ -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; } @@ -2478,7 +2485,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 ""; } @@ -2752,7 +2760,7 @@ { "ServerName", set_server_string_slot, (void *)XtOffsetOf (server_rec, server_hostname), RSRC_CONF, TAKE1, "The hostname of the server" }, -{ "ServerSignature", set_signature_flag, NULL, ACCESS_CONF|RSRC_CONF, TAKE1, +{ "ServerSignature", set_signature_flag, NULL, OR_ALL, TAKE1, "En-/disable server signature (on|off|email)" }, { "ServerRoot", set_server_root, NULL, RSRC_CONF, TAKE1, "Common directory of server-related files (logs, confs, etc.)" },