summaryrefslogtreecommitdiffstats
path: root/server/core.c
diff options
context:
space:
mode:
authorIan Holsman <ianh@apache.org>2002-08-23 20:05:38 +0200
committerIan Holsman <ianh@apache.org>2002-08-23 20:05:38 +0200
commita525e2a5ad7b969b4e33fdf2b0e541b142545bb0 (patch)
tree13fc12ea0e9df1f3671286a9dc402b8110fc8ada /server/core.c
parentnew option to ServerTokens. "Maj[or]" which displays a server response (diff)
downloadapache2-a525e2a5ad7b969b4e33fdf2b0e541b142545bb0.tar.xz
apache2-a525e2a5ad7b969b4e33fdf2b0e541b142545bb0.zip
Major/Minor/Min[imal]
now working as one (with a sane mind) would thing it should git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96501 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/core.c')
-rw-r--r--server/core.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/server/core.c b/server/core.c
index 124888acef..6848fd56cd 100644
--- a/server/core.c
+++ b/server/core.c
@@ -2286,8 +2286,9 @@ static char *server_version = NULL;
static int version_locked = 0;
enum server_token_type {
- SrvTk_MAJ, /* eg: Apache/2.0 */
- SrvTk_MIN, /* eg: Apache/2.0.41 */
+ SrvTk_MAJOR, /* eg: Apache/2 */
+ SrvTk_MINOR, /* eg. Apache/2.0 */
+ 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 */
@@ -2340,10 +2341,13 @@ static void ap_set_version(apr_pool_t *pconf)
if (ap_server_tokens == SrvTk_PRODUCT_ONLY) {
ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT);
}
- else if (ap_server_tokens == SrvTk_MIN) {
+ else if (ap_server_tokens == SrvTk_MINIMAL) {
ap_add_version_component(pconf, AP_SERVER_BASEVERSION);
}
- else if (ap_server_tokens == SrvTk_MAJ) {
+ else if (ap_server_tokens == SrvTk_MINOR) {
+ ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT "/" AP_SERVER_MINORREVISION);
+ }
+ else if (ap_server_tokens == SrvTk_MAJOR) {
ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT "/" AP_SERVER_MAJORVERSION);
}
else {
@@ -2372,10 +2376,13 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy,
ap_server_tokens = SrvTk_OS;
}
else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
- ap_server_tokens = SrvTk_MIN;
+ ap_server_tokens = SrvTk_MINIMAL;
+ }
+ else if (!strcasecmp(arg, "Major")) {
+ ap_server_tokens = SrvTk_MAJOR;
}
- else if (!strcasecmp(arg, "Maj") || !strcasecmp(arg, "Major")) {
- ap_server_tokens = SrvTk_MAJ;
+ else if (!strcasecmp(arg, "Minor") ) {
+ ap_server_tokens = SrvTk_MINOR;
}
else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
ap_server_tokens = SrvTk_PRODUCT_ONLY;