From: Ruediger Pluem Date: Mon, 17 Jul 2006 15:24:29 +0000 (+0000) Subject: * Remove ourselves from the filter chain if we failed to init libz, as we X-Git-Tag: 2.3.0~2243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef947df07e1de9855d4055ef2162ddb041f5c16a;p=thirdparty%2Fapache%2Fhttpd.git * Remove ourselves from the filter chain if we failed to init libz, as we 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 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 3d2c80a7cb5..be55010a75d 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -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); }