From: Scott MacVicar Date: Tue, 24 Mar 2009 01:57:53 +0000 (+0000) Subject: Fix bug #42362 - certain status codes never have output, so sending the gzip compress... X-Git-Tag: php-5.3.0RC2~303 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da0eb9b8e8020798edae0a0665864a276c1f6c30;p=php Fix bug #42362 - certain status codes never have output, so sending the gzip compression headers cause problems --- diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 3b4073a62b..9c4c55695f 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1034,7 +1034,7 @@ static void php_gzip_output_handler(char *output, uint output_len, char **handle { zend_bool do_start, do_end; - if (!ZLIBG(output_compression)) { + if (!ZLIBG(output_compression) || SG(sapi_headers).http_response_code == 204 || SG(sapi_headers).http_response_code == 304) { *handled_output = NULL; } else { do_start = (mode & PHP_OUTPUT_HANDLER_START ? 1 : 0);