httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject cvs commit: apache-1.3/src/main http_protocol.c
Date Mon, 25 Mar 2002 22:45:05 GMT
minfrin     02/03/25 14:45:05

  Modified:    src      CHANGES
               src/main http_protocol.c
  Log:
  Tighten up the overridden-Server-header bugfix in the proxy, by
  only overriding if the request is a proxy request. It has been
  pointed out that the previous fix allows CGIs and modules to
  override the Server header, which is change to previous behavior.
  Submitted by:	Graham Leggett, Joshua Slive
  
  Revision  Changes    Path
  1.1799    +6 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1798
  retrieving revision 1.1799
  diff -u -r1.1798 -r1.1799
  --- CHANGES	25 Mar 2002 22:33:12 -0000	1.1798
  +++ CHANGES	25 Mar 2002 22:45:05 -0000	1.1799
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3.25
   
  +  *) Tighten up the overridden-Server-header bugfix in the proxy, by
  +     only overriding if the request is a proxy request. It has been
  +     pointed out that the previous fix allows CGIs and modules to
  +     override the Server header, which is change to previous behavior.
  +     [Graham Leggett, Joshua Slive]
  +
     *) Another fix for the multiple-cookie header bug in proxy. With some
        luck this bug is actually now dead. [Graham Leggett]
   
  
  
  
  1.313     +6 -4      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.312
  retrieving revision 1.313
  diff -u -r1.312 -r1.313
  --- http_protocol.c	21 Mar 2002 14:49:46 -0000	1.312
  +++ http_protocol.c	25 Mar 2002 22:45:05 -0000	1.313
  @@ -1513,7 +1513,6 @@
   API_EXPORT(void) ap_basic_http_header(request_rec *r)
   {
       char *protocol;
  -    const char *server;
   
       if (r->assbackwards)
           return;
  @@ -1542,10 +1541,13 @@
       /* output the date header */
       ap_send_header_field(r, "Date", ap_gm_timestr_822(r->pool, r->request_time));
   
  -    /* keep a previously set server header (possible from proxy), otherwise
  +    /* keep the set-by-proxy server header, otherwise
        * generate a new server header */
  -    if (server = ap_table_get(r->headers_out, "Server")) {
  -        ap_send_header_field(r, "Server", server);
  +    if (r->proxyreq) {
  +        const char *server = ap_table_get(r->headers_out, "Server");
  +        if (server) {
  +            ap_send_header_field(r, "Server", server);
  +        }
       }
       else {
           ap_send_header_field(r, "Server", ap_get_server_version());
  
  
  

Mime
View raw message