From: Jim Jagielski Date: Thu, 10 Sep 2009 11:39:03 +0000 (+0000) Subject: veto-ed X-Git-Tag: 2.3.3~326 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4abb430731dadfef5f387a6404f7c8be7b81c39;p=thirdparty%2Fapache%2Fhttpd.git veto-ed git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@813376 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 11d6fbce3e5..ad0f248730f 100644 --- a/CHANGES +++ b/CHANGES @@ -16,11 +16,6 @@ Changes with Apache 2.3.3 *) Add support for HTTP PUT to ab. [Jeff Barnes ] - *) ServerTokens now accepts 'Off' which disables sending of - Server: header and sets SERVER_SOFTWARE to empty. It also accepts - 'Set' which allows the user to specify any string as the Server: - name. [Jim Jagielski] - *) mod_headers: generalise the envclause to support expression evaluation with ap_expr parser [Nick Kew] diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 0d714194b8a..021d83ae235 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -2862,7 +2862,7 @@ is accessed by an incompatible browser ServerTokens Configures the Server HTTP response header -ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full|Off|Set +ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full ServerTokens Full server config @@ -2903,19 +2903,6 @@ header
Server sends (e.g.): Server: Apache/2.0.41 (Unix)
-
ServerTokens Set "String"
- -
Server sends user specified string - (e.g.): Server: MyWebServer/8.6
- Note: The string must be in quotes if - there are any embedded spaces. -
- -
ServerTokens Off
- -
Server sends no Server: header - (and SERVER_SOFTWARE is blank)
-

This setting applies to the entire server, and cannot be diff --git a/server/core.c b/server/core.c index a72c34e7de7..0fdab6c356e 100644 --- a/server/core.c +++ b/server/core.c @@ -2677,7 +2677,6 @@ AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r) static char *server_banner = NULL; static int banner_locked = 0; static char *server_description = NULL; -static char *user_server_banner = NULL; enum server_token_type { SrvTk_MAJOR, /* eg: Apache/2 */ @@ -2685,9 +2684,7 @@ enum server_token_type { SrvTk_MINIMAL, /* eg: Apache/2.0.41 */ SrvTk_OS, /* eg: Apache/2.0.41 (UNIX) */ SrvTk_FULL, /* eg: Apache/2.0.41 (UNIX) PHP/4.2.2 FooBar/1.2b */ - SrvTk_PRODUCT_ONLY, /* eg: Apache */ - SrvTk_OFF, /* eg: */ - SrvTk_SET + SrvTk_PRODUCT_ONLY /* eg: Apache */ }; static enum server_token_type ap_server_tokens = SrvTk_FULL; @@ -2751,13 +2748,7 @@ AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *compone */ static void set_banner(apr_pool_t *pconf) { - if (ap_server_tokens == SrvTk_SET) { - ap_add_version_component(pconf, user_server_banner); - } - else if (ap_server_tokens == SrvTk_OFF) { - ap_add_version_component(pconf, ""); - } - else if (ap_server_tokens == SrvTk_PRODUCT_ONLY) { + if (ap_server_tokens == SrvTk_PRODUCT_ONLY) { ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT); } else if (ap_server_tokens == SrvTk_MINIMAL) { @@ -2792,14 +2783,7 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy, return err; } - if (!strcasecmp(arg1, "Set")) { - ap_server_tokens = SrvTk_SET; - user_server_banner = (arg2 ? apr_pstrdup(cmd->pool, arg2) : ""); - } - else if (!strcasecmp(arg1, "Off")) { - ap_server_tokens = SrvTk_OFF; - } - else if (!strcasecmp(arg1, "OS")) { + if (!strcasecmp(arg1, "OS")) { ap_server_tokens = SrvTk_OS; } else if (!strcasecmp(arg1, "Min") || !strcasecmp(arg1, "Minimal")) { @@ -3321,7 +3305,7 @@ AP_INIT_TAKE1("NameVirtualHost", ap_set_name_virtual_host, NULL, RSRC_CONF, "A numeric IP address:port, or the name of a host"), AP_INIT_TAKE12("ServerTokens", set_serv_tokens, NULL, RSRC_CONF, "Determine tokens displayed in the Server: header - Min(imal), " - "Major, Minor, Prod, OS, Off, Set or Full"), + "Major, Minor, Prod, OS or Full"), AP_INIT_TAKE1("LimitRequestLine", set_limit_req_line, NULL, RSRC_CONF, "Limit on maximum size of an HTTP request line"), AP_INIT_TAKE1("LimitRequestFieldsize", set_limit_req_fieldsize, NULL,