You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2002/02/15 17:33:33 UTC

cvs commit: httpd-2.0/modules/experimental mod_deflate.c

jerenkrantz    02/02/15 08:33:33

  Modified:    .        CHANGES
               modules/experimental mod_deflate.c
  Log:
  - Unset content-length in mod_deflate so that the network-layer filters are
  free to do what they want and that no C-L is improperly returned.
  - Allow non-GET requests and non-html responses to be compressed.
  
  Submitted by:	Sander Striker <st...@apache.org>
  Reviewed by:	Justin Erenkrantz
  
  Revision  Changes    Path
  1.585     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.584
  retrieving revision 1.585
  diff -u -r1.584 -r1.585
  --- CHANGES	15 Feb 2002 07:43:19 -0000	1.584
  +++ CHANGES	15 Feb 2002 16:33:32 -0000	1.585
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.33-dev
   
  +  *) Allow mod_deflate to work with non-GET requests and properly send
  +     Content-Lengths.  [Sander Striker <st...@apache.org>]
  +
     *) Fix ap_directory_merge() to correctly merge configs when there is
        no <Directory /> block.  [Justin Erenkrantz, William Rowe]
   
  
  
  
  1.3       +1 -10     httpd-2.0/modules/experimental/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_deflate.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_deflate.c	8 Dec 2001 13:05:56 -0000	1.2
  +++ mod_deflate.c	15 Feb 2002 16:33:33 -0000	1.3
  @@ -235,16 +235,6 @@
               return ap_pass_brigade(f->next, bb);
           }
   
  -        /* GETs only (for the moment) */
  -        if (r->method_number != M_GET) {
  -            return ap_pass_brigade(f->next, bb);
  -        }
  -
  -        /* only compress text/html files */
  -        if (strncmp(r->content_type, "text/html", 9)) {
  -            return ap_pass_brigade(f->next, bb);
  -        }
  -
           /* some browsers might have problems, so set no-gzip 
            * (with browsermatch) for them */
           if (apr_table_get(r->subprocess_env, "no-gzip")) {
  @@ -297,6 +287,7 @@
   
           apr_table_setn(r->headers_out, "Content-Encoding", "gzip");
           apr_table_setn(r->headers_out, "Vary", "Accept-Encoding");
  +        apr_table_unset(r->headers_out, "Content-Length");
       }
   
       APR_BRIGADE_FOREACH(e, bb) {