projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- fix object leakage when utilizing HttpRequest::onProgress()
[m6w6/ext-http]
/
http_cache_api.c
diff --git
a/http_cache_api.c
b/http_cache_api.c
index 9a6ea89057ea0d122ad68d98b63b958de507f614..f7f0c816e23a67ef4b55c2e1134a8fb36b900812 100644
(file)
--- a/
http_cache_api.c
+++ b/
http_cache_api.c
@@
-78,14
+78,16
@@
PHP_HTTP_API zend_bool _http_match_last_modified_ex(const char *entry, time_t t,
zval *zmodified;
char *modified, *chr_ptr;
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, ';'))) {
chr_ptr = 0;
}
modified = estrndup(Z_STRVAL_P(zmodified), Z_STRLEN_P(zmodified));
if ((chr_ptr = strrchr(modified, ';'))) {
chr_ptr = 0;
}
- retval = (t <= http_parse_date
(modified
));
+ retval = (t <= http_parse_date
_ex(modified, 1
));
efree(modified);
return retval;
}
efree(modified);
return retval;
}
@@
-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;
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;
if (NULL != strchr(Z_STRVAL_P(zetag), '*')) {
return 1;