]>
Commit | Line | Data |
---|---|---|
84a06529 | 1 | --- php/ext/zlib/zlib.c.orig Wed Jul 2 12:30:43 2003 |
2 | +++ php/ext/zlib/zlib.c Wed Jul 2 13:23:07 2003 | |
3 | @@ -1010,6 +1010,8 @@ | |
4 | /* return the original string */ | |
5 | *return_value = **zv_string; | |
6 | zval_copy_ctor(return_value); | |
7 | + } else { | |
8 | + SG(sapi_headers).send_default_content_type = 0; | |
9 | } | |
10 | } | |
11 | /* }}} */ | |
12 | @@ -1055,6 +1055,11 @@ | |
13 | php_ob_set_internal_handler(php_gzip_output_handler, (uint)buffer_size, "zlib output compression", 0 TSRMLS_CC); | |
14 | if (ZLIBG(output_handler) && strlen(ZLIBG(output_handler))) { | |
15 | php_start_ob_buffer_named(ZLIBG(output_handler), 0, 1 TSRMLS_CC); | |
16 | + if (sapi_add_header("Content-Encoding: gzip", sizeof("Content-Encoding: gzip") - 1, 1)!=FAILURE) { | |
17 | + if (sapi_add_header("Vary: Accept-Encoding", sizeof("Vary: Accept-Encoding") - 1, 1)==FAILURE) { | |
18 | + SG(sapi_headers).send_default_content_type = 0; | |
19 | + } | |
20 | + } | |
21 | } | |
22 | return SUCCESS; | |
23 | } |