You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2002/03/07 14:08:34 UTC
cvs commit: httpd-2.0/modules/experimental mod_deflate.c
striker 02/03/07 05:08:34
Modified: modules/experimental mod_deflate.c
Log:
Check to see if r->content_type != NULL before comparing it to something.
Remove a check that was in here twice.
Revision Changes Path
1.8 +3 -10 httpd-2.0/modules/experimental/mod_deflate.c
Index: mod_deflate.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_deflate.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mod_deflate.c 7 Mar 2002 09:27:15 -0000 1.7
+++ mod_deflate.c 7 Mar 2002 13:08:34 -0000 1.8
@@ -237,26 +237,19 @@
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);
}