]> granicus.if.org Git - php/commitdiff
Fix bug #42362 - certain status codes never have output, so sending the gzip compress...
authorScott MacVicar <scottmac@php.net>
Tue, 24 Mar 2009 01:57:53 +0000 (01:57 +0000)
committerScott MacVicar <scottmac@php.net>
Tue, 24 Mar 2009 01:57:53 +0000 (01:57 +0000)
ext/zlib/zlib.c

index 3b4073a62b8c231e2eb3d7a2d10568c3de9c0181..9c4c55695f008c4b3fb3822020c4d03fc2cbe5c9 100644 (file)
@@ -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);