From: Sander Striker Date: Thu, 7 Mar 2002 13:08:34 +0000 (+0000) Subject: Check to see if r->content_type != NULL before comparing it to something. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2eca242c1f7929a2b07466a5fe49ab8b6e22d88;p=apache Check to see if r->content_type != NULL before comparing it to something. 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 --- diff --git a/modules/experimental/mod_deflate.c b/modules/experimental/mod_deflate.c index 33e8e23515..e3a2fb84e7 100644 --- a/modules/experimental/mod_deflate.c +++ b/modules/experimental/mod_deflate.c @@ -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); }