]> granicus.if.org Git - apache/commitdiff
Check to see if r->content_type != NULL before comparing it to something.
authorSander Striker <striker@apache.org>
Thu, 7 Mar 2002 13:08:34 +0000 (13:08 +0000)
committerSander Striker <striker@apache.org>
Thu, 7 Mar 2002 13:08:34 +0000 (13:08 +0000)
Remove a check that was in here twice.

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

modules/experimental/mod_deflate.c

index 33e8e23515ef69745472f79cee859fa82c062fd8..e3a2fb84e71c4964628a9ba4e9c779e7db690a81 100644 (file)
@@ -237,26 +237,19 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
             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);
-        }
-
         /* some browsers might have problems, so set no-gzip
          * (with browsermatch) for them
          */
         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)
+        if (r->content_type != NULL
+            && strncmp(r->content_type, "text/html", 9)
             && apr_table_get(r->subprocess_env, "gzip-only-text/html")) {
             return ap_pass_brigade(f->next, bb);
         }