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, 17 Jul 2004 14:14:11 GMT
niq         2004/07/17 07:14:11

  Modified:    modules/filters mod_deflate.c
  Log:
  Fix headers in deflate_out_filter for the case of an empty first brigade
  
  Revision  Changes    Path
  1.54      +10 -1     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.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_deflate.c	4 Jul 2004 21:34:37 -0000	1.53
  +++ mod_deflate.c	17 Jul 2004 14:14:11 -0000	1.54
  @@ -382,7 +382,9 @@
               }
           }
   
  -        /* don't deflate responses with zero length e.g. proxied 304's */
  +        /* don't deflate responses with zero length e.g. proxied 304's but
  +         * we do set the header on eos_only at this point for headers_filter
  +         */
           for (bkt = APR_BRIGADE_FIRST(bb);
                bkt != APR_BRIGADE_SENTINEL(bb);
                bkt = APR_BUCKET_NEXT(bkt))
  @@ -393,6 +395,13 @@
               }
           }
           if (eos_only) {
  +            if (!encoding || !strcasecmp(encoding, "identity")) {
  +                apr_table_set(r->headers_out, "Content-Encoding", "gzip");
  +            }
  +            else {
  +                apr_table_merge(r->headers_out, "Content-Encoding", "gzip");
  +            }
  +            apr_table_unset(r->headers_out, "Content-Length");
               return ap_pass_brigade(f->next, bb);
           }
   
  
  
  

Mime
View raw message