- Fix output compression

This commit is contained in:
Jani Taskinen 2009-08-03 18:08:46 +00:00
parent 69dc1f80fd
commit bad4f893f7

View File

@ -70,7 +70,7 @@ int php_zlib_output_encoding(TSRMLS_D)
if (!ZLIBG(compression_coding)) {
zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC);
if (PG(http_globals)[TRACK_VARS_SERVER] && SUCCESS == zend_ascii_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), (void *) &enc)) {
if (PG(http_globals)[TRACK_VARS_SERVER] && SUCCESS == zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), (void *) &enc)) {
convert_to_string(*enc);
if (strstr(Z_STRVAL_PP(enc), "gzip")) {
ZLIBG(compression_coding) = PHP_ZLIB_ENCODING_GZIP;