You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ia...@apache.org on 2002/08/23 19:24:40 UTC

cvs commit: httpd-2.0/docs/manual/mod core.xml

ianh        2002/08/23 10:24:40

  Modified:    .        CHANGES
               include  ap_release.h
               server   core.c
               docs/conf httpd-std.conf.in
               docs/manual/mod core.xml
  Log:
  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
  
  Revision  Changes    Path
  1.896     +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.895
  retrieving revision 1.896
  diff -u -r1.895 -r1.896
  --- CHANGES	23 Aug 2002 12:49:07 -0000	1.895
  +++ CHANGES	23 Aug 2002 17:24:38 -0000	1.896
  @@ -1,5 +1,9 @@
   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]
  
  
  
  1.70      +3 -1      httpd-2.0/include/ap_release.h
  
  Index: ap_release.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/ap_release.h,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- ap_release.h	9 Aug 2002 19:18:59 -0000	1.69
  +++ ap_release.h	23 Aug 2002 17:24:39 -0000	1.70
  @@ -73,7 +73,9 @@
    */
   #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
   
  
  
  
  1.200     +10 -3     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.199
  retrieving revision 1.200
  diff -u -r1.199 -r1.200
  --- core.c	18 Aug 2002 07:16:01 -0000	1.199
  +++ core.c	23 Aug 2002 17:24:39 -0000	1.200
  @@ -2286,9 +2286,10 @@
   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;
  @@ -2342,6 +2343,9 @@
       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 ")");
       }
  @@ -2369,6 +2373,9 @@
       }
       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;
  
  
  
  1.15      +8 -0      httpd-2.0/docs/conf/httpd-std.conf.in
  
  Index: httpd-std.conf.in
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf.in,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- httpd-std.conf.in	21 Aug 2002 15:38:36 -0000	1.14
  +++ httpd-std.conf.in	23 Aug 2002 17:24:39 -0000	1.15
  @@ -502,6 +502,14 @@
   #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 
   # listings, mod_status and mod_info output etc., but not CGI generated 
  
  
  
  1.24      +10 -5     httpd-2.0/docs/manual/mod/core.xml
  
  Index: core.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/core.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- core.xml	17 Aug 2002 23:52:12 -0000	1.23
  +++ core.xml	23 Aug 2002 17:24:39 -0000	1.24
  @@ -2288,7 +2288,7 @@
   <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>
   
  @@ -2304,20 +2304,25 @@
         <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
  
  
  

Re: cvs commit: httpd-2.0/docs/manual/mod core.xml

Posted by Justin Erenkrantz <je...@apache.org>.
On Fri, Aug 23, 2002 at 10:38:57AM -0700, Ian Holsman wrote:
> the problem is that 'minor' would clash with 'minimal' and I don't want 
> to break existing configurations.
> Can you think of a term which would mean 'print Apache/2.0'

Hmm.  Major-Minor?  Or, couldn't we do:

ServerTokens min  => minimal
ServerToken  minor

The parser would require minor to be spelled out entirely, otherwise
it is treated as minimal.  I'm not sure why we even accept the
short-hand forms.  The names aren't that long.  -- justin

Re: cvs commit: httpd-2.0/docs/manual/mod core.xml

Posted by Ian Holsman <ia...@apache.org>.
Justin Erenkrantz wrote:
> On Fri, Aug 23, 2002 at 05:24:40PM -0000, ianh@apache.org wrote:
> 
>>  Index: ap_release.h
>>  ===================================================================
>>  RCS file: /home/cvs/httpd-2.0/include/ap_release.h,v
>>  retrieving revision 1.69
>>  retrieving revision 1.70
>>  diff -u -r1.69 -r1.70
>>  --- ap_release.h	9 Aug 2002 19:18:59 -0000	1.69
>>  +++ ap_release.h	23 Aug 2002 17:24:39 -0000	1.70
>>  @@ -73,7 +73,9 @@
>>    */
>>   #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"
> 
> 
> Eh, no.
> 
> major.minor.patch
> 
doh.
> ServerTokens Major would just print 2 - not 2.0.  -- justin
> 
the problem is that 'minor' would clash with 'minimal' and I don't want 
to break existing configurations.
Can you think of a term which would mean 'print Apache/2.0'


Re: cvs commit: httpd-2.0/docs/manual/mod core.xml

Posted by Ian Holsman <ia...@apache.org>.
Justin Erenkrantz wrote:
> On Fri, Aug 23, 2002 at 05:24:40PM -0000, ianh@apache.org wrote:
> 
>>  Index: ap_release.h
>>  ===================================================================
>>  RCS file: /home/cvs/httpd-2.0/include/ap_release.h,v
>>  retrieving revision 1.69
>>  retrieving revision 1.70
>>  diff -u -r1.69 -r1.70
>>  --- ap_release.h	9 Aug 2002 19:18:59 -0000	1.69
>>  +++ ap_release.h	23 Aug 2002 17:24:39 -0000	1.70
>>  @@ -73,7 +73,9 @@
>>    */
>>   #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"
> 
> 
> Eh, no.
> 
> major.minor.patch
> 
doh.
> ServerTokens Major would just print 2 - not 2.0.  -- justin
> 
the problem is that 'minor' would clash with 'minimal' and I don't want 
to break existing configurations.
Can you think of a term which would mean 'print Apache/2.0'


Re: cvs commit: httpd-2.0/docs/manual/mod core.xml

Posted by Justin Erenkrantz <je...@apache.org>.
On Fri, Aug 23, 2002 at 05:24:40PM -0000, ianh@apache.org wrote:
>   Index: ap_release.h
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/include/ap_release.h,v
>   retrieving revision 1.69
>   retrieving revision 1.70
>   diff -u -r1.69 -r1.70
>   --- ap_release.h	9 Aug 2002 19:18:59 -0000	1.69
>   +++ ap_release.h	23 Aug 2002 17:24:39 -0000	1.70
>   @@ -73,7 +73,9 @@
>     */
>    #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"

Eh, no.

major.minor.patch

ServerTokens Major would just print 2 - not 2.0.  -- justin

Re: cvs commit: httpd-2.0/docs/manual/mod core.xml

Posted by Justin Erenkrantz <je...@apache.org>.
On Fri, Aug 23, 2002 at 05:24:40PM -0000, ianh@apache.org wrote:
>   Index: ap_release.h
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/include/ap_release.h,v
>   retrieving revision 1.69
>   retrieving revision 1.70
>   diff -u -r1.69 -r1.70
>   --- ap_release.h	9 Aug 2002 19:18:59 -0000	1.69
>   +++ ap_release.h	23 Aug 2002 17:24:39 -0000	1.70
>   @@ -73,7 +73,9 @@
>     */
>    #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"

Eh, no.

major.minor.patch

ServerTokens Major would just print 2 - not 2.0.  -- justin