Hi,

This patch gets us working with subversion ;)

This removes some checks that go against the spec.  If
we have broken browsers out there, we can BrowserMatch
for them.  But by default we want to get everything
through this filter.

Justin identified a problem with the Content-Length
header being preserved.

Ofcourse mod_deflate still needs some work, but this
is a (small) step in the right direction.


Sander


Index: modules/experimental/mod_deflate.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/experimental/mod_deflate.c,v
retrieving revision 1.2
diff -u -r1.2 mod_deflate.c
--- modules/experimental/mod_deflate.c  8 Dec 2001 13:05:56 -0000       1.2
+++ modules/experimental/mod_deflate.c  15 Feb 2002 09:30:51 -0000
@@ -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) {

Attachment: mod_deflate.patch
Description: Binary data

Reply via email to