From ef947df07e1de9855d4055ef2162ddb041f5c16a Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Mon, 17 Jul 2006 15:24:29 +0000 Subject: [PATCH] * 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 --- modules/filters/mod_deflate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 3d2c80a7cb..be55010a75 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); } -- 2.49.0