httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_deflate.c
Date Sat, 08 Mar 2003 17:08:34 GMT
nd          2003/03/08 09:08:34

  Modified:    .        CHANGES
               modules/filters mod_deflate.c
  Log:
  Check also err_headers_out for an already set Content-Encoding:
  gzip header. This prevents gzip compressed content from a CGI
  script from being compressed once more.
  
  PR: 17797
  
  Revision  Changes    Path
  1.1114    +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1113
  retrieving revision 1.1114
  diff -u -r1.1113 -r1.1114
  --- CHANGES	7 Mar 2003 21:30:36 -0000	1.1113
  +++ CHANGES	8 Mar 2003 17:08:33 -0000	1.1114
  @@ -2,6 +2,11 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_deflate: Check also err_headers_out for an already set
  +     Content-Encoding: gzip header. This prevents gzip compressed content
  +     from a CGI script from being compressed once more. PR 17797.
  +     [André Malo]
  +
     *) Forward port: Escape special characters (especially control
        characters) in mod_log_config to make a clear distinction between
        client-supplied strings (with special characters) and server-side
  
  
  
  1.32      +12 -0     httpd-2.0/modules/filters/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_deflate.c	5 Mar 2003 22:14:33 -0000	1.31
  +++ mod_deflate.c	8 Mar 2003 17:08:34 -0000	1.32
  @@ -329,6 +329,18 @@
            */
           encoding = apr_table_get(r->headers_out, "Content-Encoding");
           if (encoding) {
  +            const char *err_enc;
  +
  +            err_enc = apr_table_get(r->err_headers_out, "Content-Encoding");
  +            if (err_enc) {
  +                encoding = apr_pstrcat(r->pool, encoding, ",", err_enc, NULL);
  +            }
  +        }
  +        else {
  +            encoding = apr_table_get(r->err_headers_out, "Content-Encoding");
  +        }
  +
  +        if (encoding) {
               const char *tmp = encoding;
   
               token = ap_get_token(r->pool, &tmp, 0);
  
  
  

Mime
View raw message