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
maps. The dbm type (e.g., ndbm, gdbm) can be specified on the
RewriteMap directive. PR 10644 [Jeff Trawick]
#
#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
# name to server-generated pages (internal error documents, FTP directory
<directivesynopsis>
<name>ServerTokens</name>
<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>
<contextlist><context>server config</context></contextlist>
<dd>Server sends (<em>e.g.</em>): <code>Server:
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>
<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>
- <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>
<dt><code>ServerTokens Full</code> (or not specified)</dt>
- <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/1.3.0
- (Unix) PHP/3.0 MyMod/1.2</code></dd>
+ <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
+ (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
</dl>
<p>This setting applies to the entire server, and cannot be
*/
#define AP_SERVER_BASEVENDOR "Apache Software Foundation"
#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_VERSION AP_SERVER_BASEVERSION
static int version_locked = 0;
enum server_token_type {
- SrvTk_MIN, /* eg: Apache/1.3.0 */
- SrvTk_OS, /* eg: Apache/1.3.0 (UNIX) */
- SrvTk_FULL, /* eg: Apache/1.3.0 (UNIX) PHP/3.0 FooBar/1.2b */
+ SrvTk_MAJ, /* eg: Apache/2.0 */
+ SrvTk_MIN, /* 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 */
};
static enum server_token_type ap_server_tokens = SrvTk_FULL;
else if (ap_server_tokens == SrvTk_MIN) {
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 {
ap_add_version_component(pconf, AP_SERVER_BASEVERSION " (" PLATFORM ")");
}
else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
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")) {
ap_server_tokens = SrvTk_PRODUCT_ONLY;
}