You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@locus.apache.org on 2000/02/28 14:42:25 UTC
cvs commit: apache-1.3/src/main http_core.c http_main.c
coar 00/02/28 05:42:25
Modified: src CHANGES
htdocs/manual/mod core.html
src/include httpd.h
src/main http_core.c http_main.c
Log:
Some Apache users are nervous about the version number (e.g.,
"Apache/1.3.11") in the Server: version string -- so add a
new ServerTokens keyword that displays just the product name
with no version (i.e., "Apache").
Revision Changes Path
1.1517 +7 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1516
retrieving revision 1.1517
diff -u -r1.1516 -r1.1517
--- CHANGES 2000/02/23 23:06:35 1.1516
+++ CHANGES 2000/02/28 13:42:22 1.1517
@@ -1,5 +1,12 @@
Changes with Apache 1.3.13
+ *) The ServerTokens directive now accepts the 'ProductOnly' keyword,
+ which results in the display of just 'Apache' with no version
+ information. Additional product tokens are still only visible
+ with ServerTokens Full. In addition, ServerTokens now complains
+ about bogus keywords (which it used to silently treat as 'Full').
+ [Ken Coar]
+
Changes with Apache 1.3.12
*) Only OS/2 requires the addition "t" flag for ap_pfopen()
1.166 +7 -2 apache-1.3/htdocs/manual/mod/core.html
Index: core.html
===================================================================
RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- core.html 2000/02/05 00:33:18 1.165
+++ core.html 2000/02/28 13:42:23 1.166
@@ -2926,7 +2926,7 @@
<A
HREF="directive-dict.html#Syntax"
REL="Help"
-><STRONG>Syntax:</STRONG></A> ServerTokens <EM>Minimal|OS|Full</EM><BR>
+><STRONG>Syntax:</STRONG></A> ServerTokens <EM>Minimal|ProductOnly|OS|Full</EM><BR>
<A
HREF="directive-dict.html#Default"
REL="Help"
@@ -2943,7 +2943,8 @@
HREF="directive-dict.html#Compatibility"
REL="Help"
><STRONG>Compatibility:</STRONG></A> ServerTokens is only available
- in Apache 1.3 and later
+ in Apache 1.3 and later; the <code>ProductOnly</code> keyword is
+ only available in versions later than 1.3.12
<P>
This directive controls whether <SAMP>Server</SAMP> response header
@@ -2951,6 +2952,10 @@
OS-type of the server as well as information about compiled-in modules.
</P>
<DL>
+ <DT><CODE>ServerTokens Prod[uctOnly]</CODE>
+ </DT>
+ <DD>Server sends (<EM>e.g.</EM>): <SAMP>Server: Apache</SAMP>
+ </DD>
<DT><CODE>ServerTokens Min[imal]</CODE>
</DT>
<DD>Server sends (<EM>e.g.</EM>): <SAMP>Server: Apache/1.3.0</SAMP>
1.308 +4 -2 apache-1.3/src/include/httpd.h
Index: httpd.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -r1.307 -r1.308
--- httpd.h 2000/02/23 23:06:37 1.307
+++ httpd.h 2000/02/28 13:42:24 1.308
@@ -427,12 +427,14 @@
* Example: "Apache/1.1.0 MrWidget/0.1-alpha"
*/
-#define SERVER_BASEVERSION "Apache/1.3.13-dev" /* SEE COMMENTS ABOVE */
+#define SERVER_PRODUCT "Apache"
+#define SERVER_BASEVERSION SERVER_PRODUCT "/1.3.13-dev" /* SEE COMMENTS ABOVE */
#define SERVER_VERSION SERVER_BASEVERSION
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_FULL, /* eg: Apache/1.3.0 (UNIX) PHP/3.0 FooBar/1.2b */
+ SrvTk_PRODUCT_ONLY /* eg: Apache */
};
API_EXPORT(const char *) ap_get_server_version(void);
1.282 +8 -1 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.281
retrieving revision 1.282
diff -u -r1.281 -r1.282
--- http_core.c 2000/02/18 20:41:47 1.281
+++ http_core.c 2000/02/28 13:42:24 1.282
@@ -2643,8 +2643,15 @@
else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
ap_server_tokens = SrvTk_MIN;
}
- else {
+ else if (!strcasecmp(arg, "Full")) {
ap_server_tokens = SrvTk_FULL;
+ }
+ else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
+ ap_server_tokens = SrvTk_PRODUCT_ONLY;
+ }
+ else {
+ return ap_pstrcat(cmd->pool, "Unrecognised ServerTokens keyword: ",
+ arg, NULL);
}
return NULL;
}
1.492 +4 -1 apache-1.3/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.491
retrieving revision 1.492
diff -u -r1.491 -r1.492
--- http_main.c 2000/02/05 12:01:52 1.491
+++ http_main.c 2000/02/28 13:42:24 1.492
@@ -423,7 +423,10 @@
*/
static void ap_set_version(void)
{
- if (ap_server_tokens == SrvTk_MIN) {
+ if (ap_server_tokens == SrvTk_PRODUCT_ONLY) {
+ ap_add_version_component(SERVER_PRODUCT);
+ }
+ else if (ap_server_tokens == SrvTk_MIN) {
ap_add_version_component(SERVER_BASEVERSION);
}
else {