From: Michael Wallner Date: Sun, 26 Mar 2006 16:05:50 +0000 (+0000) Subject: - fixed access of super globals X-Git-Tag: RELEASE_1_0_0RC3~31 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9ba68660f21ea9481af483dffd666ae5bee72d11;p=m6w6%2Fext-http - fixed access of super globals --- diff --git a/http_api.c b/http_api.c index e3ea4dc..774e603 100644 --- a/http_api.c +++ b/http_api.c @@ -196,7 +196,9 @@ PHP_HTTP_API zval *_http_get_server_var_ex(const char *key, size_t key_size, zen { zval **hsv; zval **var; - +#ifdef ZEND_ENGINE_2 + zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC); +#endif if ((SUCCESS != zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &hsv)) || (Z_TYPE_PP(hsv) != IS_ARRAY)) { return NULL; } diff --git a/http_cache_api.c b/http_cache_api.c index a03a961..582c3cc 100644 --- a/http_cache_api.c +++ b/http_cache_api.c @@ -85,6 +85,7 @@ PHP_HTTP_API zend_bool _http_match_last_modified_ex(const char *entry, time_t t, if ((chr_ptr = strrchr(modified, ';'))) { chr_ptr = 0; } + retval = (t <= http_parse_date(modified)); efree(modified); return retval; diff --git a/http_headers_api.c b/http_headers_api.c index 2493218..c262145 100644 --- a/http_headers_api.c +++ b/http_headers_api.c @@ -426,7 +426,9 @@ PHP_HTTP_API void _http_get_request_headers_ex(HashTable *headers, zend_bool pre HashPosition pos; Z_ARRVAL(array) = headers; - +#ifdef ZEND_ENGINE_2 + zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC); +#endif if (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &hsv)) { FOREACH_KEYLEN(pos, *hsv, key, keylen, idx) { if (key && keylen > 6 && !strncmp(key, "HTTP_", 5)) { diff --git a/http_querystring_object.c b/http_querystring_object.c index dbfd85b..d47c495 100644 --- a/http_querystring_object.c +++ b/http_querystring_object.c @@ -401,12 +401,17 @@ PHP_METHOD(HttpQueryString, __construct) http_error(HE_ERROR, HTTP_E_QUERYSTRING, "The SAPI does not have a treat_data function registered"); } else if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|bz", &global, ¶ms)) { if (global) { +#ifdef ZEND_ENGINE_2 + zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC); +#endif if ( (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &_SERVER)) && (Z_TYPE_PP(_SERVER) == IS_ARRAY) && (SUCCESS == zend_hash_find(Z_ARRVAL_PP(_SERVER), "QUERY_STRING", sizeof("QUERY_STRING"), (void **) &QUERY_STRING))) { qstring = *QUERY_STRING; - +#ifdef ZEND_ENGINE_2 + zend_is_auto_global("_GET", lenof("_GET") TSRMLS_CC); +#endif if ((SUCCESS == zend_hash_find(&EG(symbol_table), "_GET", sizeof("_GET"), (void **) &_GET)) && (Z_TYPE_PP(_GET) == IS_ARRAY)) { qarray = *_GET; } else { diff --git a/package2.xml b/package2.xml index cc99e7d..fe78373 100644 --- a/package2.xml +++ b/package2.xml @@ -47,6 +47,7 @@ HttpResponse BSD, revised = 7.15.2 fails +* Fixed access of super globals ]]>