]> granicus.if.org Git - apache/commitdiff
I'm happy now
authorIan Holsman <ianh@apache.org>
Fri, 15 Feb 2002 19:44:25 +0000 (19:44 +0000)
committerIan Holsman <ianh@apache.org>
Fri, 15 Feb 2002 19:44:25 +0000 (19:44 +0000)
gzip-only-text/html environment variable present

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

modules/experimental/mod_deflate.c

index 8a3d3b057fb20f96ce3a4161e38f8ecd5bd0e599..b60e740cfced2ee72bdc749620497b3f3ccb841f 100644 (file)
@@ -240,6 +240,14 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
         if (apr_table_get(r->subprocess_env, "no-gzip")) {
             return ap_pass_brigade(f->next, bb);
         }
+        /* Some browsers might have problems with content types
+         * other than text/html, so set gzip-only-text/html
+         * (with browsermatch) for them
+         */
+        if (strncmp(r->content_type, "text/html", 9)
+            && apr_table_get(r->subprocess_env, "gzip-only-text/html")) {
+            return ap_pass_brigade(f->next, bb);
+        }
 
         /* if they don't have the line, then they can't play */
         accepts = apr_table_get(r->headers_in, "Accept-Encoding");