X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_cache_api.c;h=f7f0c816e23a67ef4b55c2e1134a8fb36b900812;hp=adba374d5c65ef90726a5e4d4f9100a07a092709;hb=b3afcfc70bf06c062115f4994cc04fc8c6e4aa67;hpb=76d11ef7477a1caf622ac9823da6b2b098c9b86c diff --git a/http_cache_api.c b/http_cache_api.c index adba374..f7f0c81 100644 --- a/http_cache_api.c +++ b/http_cache_api.c @@ -78,7 +78,9 @@ PHP_HTTP_API zend_bool _http_match_last_modified_ex(const char *entry, time_t t, zval *zmodified; char *modified, *chr_ptr; - HTTP_GSC(zmodified, entry, !enforce_presence); + if (!(zmodified = http_get_server_var(entry, 1))) { + return !enforce_presence; + } modified = estrndup(Z_STRVAL_P(zmodified), Z_STRLEN_P(zmodified)); if ((chr_ptr = strrchr(modified, ';'))) { @@ -98,7 +100,9 @@ PHP_HTTP_API zend_bool _http_match_etag_ex(const char *entry, const char *etag, char *quoted_etag; zend_bool result; - HTTP_GSC(zetag, entry, !enforce_presence); + if (!(zetag = http_get_server_var_ex(entry, strlen(entry)+1, 1))) { + return !enforce_presence; + } if (NULL != strchr(Z_STRVAL_P(zetag), '*')) { return 1;