mirror of
https://github.com/apache/httpd.git
synced 2025-11-05 05:30:39 +03:00
new option to ServerTokens. "Maj[or]" which displays a server response
similar to Apache/2.0 Also surfaced the directive in the standard config, defaulting to FULL git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96500 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,5 +1,9 @@
|
|||||||
Changes with Apache 2.0.41
|
Changes with Apache 2.0.41
|
||||||
|
|
||||||
|
*) New option to ServerTokens 'maj[or]'. Only show the major version
|
||||||
|
Also Surfaced this directive in the standard config (default FULL)
|
||||||
|
[Ian Holsman]
|
||||||
|
|
||||||
*) Change mod_rewrite to use apr-util's dbm support for dbm rewrite
|
*) Change mod_rewrite to use apr-util's dbm support for dbm rewrite
|
||||||
maps. The dbm type (e.g., ndbm, gdbm) can be specified on the
|
maps. The dbm type (e.g., ndbm, gdbm) can be specified on the
|
||||||
RewriteMap directive. PR 10644 [Jeff Trawick]
|
RewriteMap directive. PR 10644 [Jeff Trawick]
|
||||||
|
|||||||
@@ -501,6 +501,14 @@ CustomLog @rel_logfiledir@/access_log common
|
|||||||
#
|
#
|
||||||
#CustomLog @rel_logfiledir@/access_log combined
|
#CustomLog @rel_logfiledir@/access_log combined
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerTokens
|
||||||
|
# This directive configures what you return as the Server HTTP response
|
||||||
|
# Header. The default is 'Full' which sends information about the OS-Type
|
||||||
|
# and compiled in modules.
|
||||||
|
# Set to one of: Full | OS | Minor | Major | Prod
|
||||||
|
# where Full conveys the most information, and Prod the least.
|
||||||
|
ServerTokens Full
|
||||||
#
|
#
|
||||||
# Optionally add a line containing the server version and virtual host
|
# Optionally add a line containing the server version and virtual host
|
||||||
# name to server-generated pages (internal error documents, FTP directory
|
# name to server-generated pages (internal error documents, FTP directory
|
||||||
|
|||||||
@@ -2288,7 +2288,7 @@ is accessed by an incompatible browser</description>
|
|||||||
<directivesynopsis>
|
<directivesynopsis>
|
||||||
<name>ServerTokens</name>
|
<name>ServerTokens</name>
|
||||||
<description>Configures the Server HTTP response header</description>
|
<description>Configures the Server HTTP response header</description>
|
||||||
<syntax>ServerTokens Minimal|ProductOnly|OS|Full</syntax>
|
<syntax>ServerTokens Major|Minimal|ProductOnly|OS|Full</syntax>
|
||||||
<default>ServerTokens Full</default>
|
<default>ServerTokens Full</default>
|
||||||
<contextlist><context>server config</context></contextlist>
|
<contextlist><context>server config</context></contextlist>
|
||||||
|
|
||||||
@@ -2304,20 +2304,25 @@ is accessed by an incompatible browser</description>
|
|||||||
<dd>Server sends (<em>e.g.</em>): <code>Server:
|
<dd>Server sends (<em>e.g.</em>): <code>Server:
|
||||||
Apache</code></dd>
|
Apache</code></dd>
|
||||||
|
|
||||||
|
<dt><code>ServerTokens Maj[or]</code></dt>
|
||||||
|
|
||||||
|
<dd>Server sends (<em>e.g.</em>): <code>Server:
|
||||||
|
Apache/2.0</code></dd>
|
||||||
|
|
||||||
<dt><code>ServerTokens Min[imal]</code></dt>
|
<dt><code>ServerTokens Min[imal]</code></dt>
|
||||||
|
|
||||||
<dd>Server sends (<em>e.g.</em>): <code>Server:
|
<dd>Server sends (<em>e.g.</em>): <code>Server:
|
||||||
Apache/1.3.0</code></dd>
|
Apache/2.0.41</code></dd>
|
||||||
|
|
||||||
<dt><code>ServerTokens OS</code></dt>
|
<dt><code>ServerTokens OS</code></dt>
|
||||||
|
|
||||||
<dd>Server sends (<em>e.g.</em>): <code>Server: Apache/1.3.0
|
<dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
|
||||||
(Unix)</code></dd>
|
(Unix)</code></dd>
|
||||||
|
|
||||||
<dt><code>ServerTokens Full</code> (or not specified)</dt>
|
<dt><code>ServerTokens Full</code> (or not specified)</dt>
|
||||||
|
|
||||||
<dd>Server sends (<em>e.g.</em>): <code>Server: Apache/1.3.0
|
<dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
|
||||||
(Unix) PHP/3.0 MyMod/1.2</code></dd>
|
(Unix) PHP/4.2.2 MyMod/1.2</code></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<p>This setting applies to the entire server, and cannot be
|
<p>This setting applies to the entire server, and cannot be
|
||||||
|
|||||||
@@ -73,7 +73,9 @@
|
|||||||
*/
|
*/
|
||||||
#define AP_SERVER_BASEVENDOR "Apache Software Foundation"
|
#define AP_SERVER_BASEVENDOR "Apache Software Foundation"
|
||||||
#define AP_SERVER_BASEPRODUCT "Apache"
|
#define AP_SERVER_BASEPRODUCT "Apache"
|
||||||
#define AP_SERVER_BASEREVISION "2.0.41-dev"
|
#define AP_SERVER_MAJORVERSION "2.0"
|
||||||
|
#define AP_SERVER_MINORVERSION "41-dev"
|
||||||
|
#define AP_SERVER_BASEREVISION AP_SERVER_MAJORVERSION "." AP_SERVER_MINORVERSION
|
||||||
#define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION
|
#define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION
|
||||||
#define AP_SERVER_VERSION AP_SERVER_BASEVERSION
|
#define AP_SERVER_VERSION AP_SERVER_BASEVERSION
|
||||||
|
|
||||||
|
|||||||
@@ -2286,9 +2286,10 @@ static char *server_version = NULL;
|
|||||||
static int version_locked = 0;
|
static int version_locked = 0;
|
||||||
|
|
||||||
enum server_token_type {
|
enum server_token_type {
|
||||||
SrvTk_MIN, /* eg: Apache/1.3.0 */
|
SrvTk_MAJ, /* eg: Apache/2.0 */
|
||||||
SrvTk_OS, /* eg: Apache/1.3.0 (UNIX) */
|
SrvTk_MIN, /* eg: Apache/2.0.41 */
|
||||||
SrvTk_FULL, /* eg: Apache/1.3.0 (UNIX) PHP/3.0 FooBar/1.2b */
|
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_PRODUCT_ONLY /* eg: Apache */
|
||||||
};
|
};
|
||||||
static enum server_token_type ap_server_tokens = SrvTk_FULL;
|
static enum server_token_type ap_server_tokens = SrvTk_FULL;
|
||||||
@@ -2342,6 +2343,9 @@ static void ap_set_version(apr_pool_t *pconf)
|
|||||||
else if (ap_server_tokens == SrvTk_MIN) {
|
else if (ap_server_tokens == SrvTk_MIN) {
|
||||||
ap_add_version_component(pconf, AP_SERVER_BASEVERSION);
|
ap_add_version_component(pconf, AP_SERVER_BASEVERSION);
|
||||||
}
|
}
|
||||||
|
else if (ap_server_tokens == SrvTk_MAJ) {
|
||||||
|
ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT "/" AP_SERVER_MAJORVERSION);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
ap_add_version_component(pconf, AP_SERVER_BASEVERSION " (" PLATFORM ")");
|
ap_add_version_component(pconf, AP_SERVER_BASEVERSION " (" PLATFORM ")");
|
||||||
}
|
}
|
||||||
@@ -2370,6 +2374,9 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy,
|
|||||||
else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
|
else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
|
||||||
ap_server_tokens = SrvTk_MIN;
|
ap_server_tokens = SrvTk_MIN;
|
||||||
}
|
}
|
||||||
|
else if (!strcasecmp(arg, "Maj") || !strcasecmp(arg, "Major")) {
|
||||||
|
ap_server_tokens = SrvTk_MAJ;
|
||||||
|
}
|
||||||
else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
|
else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
|
||||||
ap_server_tokens = SrvTk_PRODUCT_ONLY;
|
ap_server_tokens = SrvTk_PRODUCT_ONLY;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user