diff options
-rw-r--r-- | ext/soap/soap.c | 3 | ||||
-rw-r--r-- | ext/zlib/zlib.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 6e5116a2a3..daf977e8a3 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2071,8 +2071,7 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade xmlDocDumpMemory(doc_return, &buf, &size); - zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC); - if (PG(http_globals)[TRACK_VARS_SERVER] && + if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC)) && zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name) == SUCCESS && Z_TYPE_PP(agent_name) == IS_STRING) { if (strncmp(Z_STRVAL_PP(agent_name), "Shockwave Flash", sizeof("Shockwave Flash")-1) == 0) { diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 4c98fae8f7..d70198c674 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -82,8 +82,8 @@ static int php_zlib_output_encoding(TSRMLS_D) zval **enc; if (!ZLIBG(compression_coding)) { - zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC); - 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)) { + if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC)) && + 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; |