--- php/ext/zlib/zlib.c.orig Wed Jul 2 12:30:43 2003 +++ php/ext/zlib/zlib.c Wed Jul 2 13:23:07 2003 @@ -1010,6 +1010,8 @@ /* return the original string */ *return_value = **zv_string; zval_copy_ctor(return_value); + } else { + SG(sapi_headers).send_default_content_type = 0; } } /* }}} */ @@ -1055,6 +1055,11 @@ php_ob_set_internal_handler(php_gzip_output_handler, (uint)buffer_size, "zlib output compression", 0 TSRMLS_CC); if (ZLIBG(output_handler) && strlen(ZLIBG(output_handler))) { php_start_ob_buffer_named(ZLIBG(output_handler), 0, 1 TSRMLS_CC); + if (sapi_add_header("Content-Encoding: gzip", sizeof("Content-Encoding: gzip") - 1, 1)!=FAILURE) { + if (sapi_add_header("Vary: Accept-Encoding", sizeof("Vary: Accept-Encoding") - 1, 1)==FAILURE) { + SG(sapi_headers).send_default_content_type = 0; + } + } } return SUCCESS; }