]> granicus.if.org Git - apache/commitdiff
* Remove ourselves from the filter chain if we failed to init libz, as we
authorRuediger Pluem <rpluem@apache.org>
Mon, 17 Jul 2006 15:24:29 +0000 (15:24 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 17 Jul 2006 15:24:29 +0000 (15:24 +0000)
  pass data down the filter chain uncompressed afterwards.

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

modules/filters/mod_deflate.c

index 3d2c80a7cb5411e4e60a6b6531326bf213365348..be55010a75d2dc786ef87a0773c8bc11dfd1c67e 100644 (file)
@@ -405,11 +405,16 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
                            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);
         }