]> granicus.if.org Git - apache/commitdiff
- Unset content-length in mod_deflate so that the network-layer filters are
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 15 Feb 2002 16:33:33 +0000 (16:33 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 15 Feb 2002 16:33:33 +0000 (16:33 +0000)
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 <striker@apache.org>
Reviewed by: Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93428 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/experimental/mod_deflate.c

diff --git a/CHANGES b/CHANGES
index d6feb55f37eec46868883cbca583d97891da6d82..9d63e4ae2ed347fa043ac8932a4bb3bba7d636cd 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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 <striker@apache.org>]
+
   *) Fix ap_directory_merge() to correctly merge configs when there is
      no <Directory /> block.  [Justin Erenkrantz, William Rowe]
 
index 8e9be6c5c21c7a910ef26273639eb7ab64f070ea..8a3d3b057fb20f96ce3a4161e38f8ecd5bd0e599 100644 (file)
@@ -235,16 +235,6 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
             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 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
 
         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) {