httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r422739 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Date Mon, 17 Jul 2006 15:24:30 GMT
Author: rpluem
Date: Mon Jul 17 08:24:29 2006
New Revision: 422739

URL: http://svn.apache.org/viewvc?rev=422739&view=rev
Log:
* Remove ourselves from the filter chain if we failed to init libz, as we
  pass data down the filter chain uncompressed afterwards.

Modified:
    httpd/httpd/trunk/modules/filters/mod_deflate.c

Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=422739&r1=422738&r2=422739&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Mon Jul 17 08:24:29 2006
@@ -405,11 +405,16 @@
                            Z_DEFAULT_STRATEGY);
 
         if (zRC != Z_OK) {
-            f->ctx = NULL;
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                           "unable to init Zlib: "
                           "deflateInit2 returned %d: URL %s",
                           zRC, r->uri);
+            /*
+             * Remove ourselves as it does not make sense to return:
+             * We are not able to init libz and pass data down the chain
+             * uncompressed.
+             */
+            ap_remove_output_filter(f);
             return ap_pass_brigade(f->next, bb);
         }
 



Mime
View raw message