projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag 'RELEASE_0_18_0'.
[m6w6/ext-http]
/
http_cache_api.c
diff --git
a/http_cache_api.c
b/http_cache_api.c
index 11609f989fee4132832bc67c7144ff08ee569e13..eb68044cb27b03e2ebc7157683cb62253b6866ee 100644
(file)
--- a/
http_cache_api.c
+++ b/
http_cache_api.c
@@
-120,7
+120,7
@@
PHP_HTTP_API zend_bool _http_match_last_modified_ex(const char *entry, time_t t,
HTTP_GSC(zmodified, entry, !enforce_presence);
modified = estrndup(Z_STRVAL_P(zmodified), Z_STRLEN_P(zmodified));
HTTP_GSC(zmodified, entry, !enforce_presence);
modified = estrndup(Z_STRVAL_P(zmodified), Z_STRLEN_P(zmodified));
- if (
chr_ptr = strrchr(modified, ';'
)) {
+ if (
(chr_ptr = strrchr(modified, ';')
)) {
chr_ptr = 0;
}
retval = (t <= http_parse_date(modified));
chr_ptr = 0;
}
retval = (t <= http_parse_date(modified));
@@
-160,6
+160,10
@@
PHP_HTTP_API STATUS _http_cache_last_modified(time_t last_modified,
{
char *sent_header = NULL;
{
char *sent_header = NULL;
+ if (SG(headers_sent)) {
+ return FAILURE;
+ }
+
if (cc_len && (SUCCESS != http_send_cache_control(cache_control, cc_len))) {
return FAILURE;
}
if (cc_len && (SUCCESS != http_send_cache_control(cache_control, cc_len))) {
return FAILURE;
}
@@
-184,6
+188,10
@@
PHP_HTTP_API STATUS _http_cache_etag(const char *etag, size_t etag_len,
{
char *sent_header = NULL;
{
char *sent_header = NULL;
+ if (SG(headers_sent)) {
+ return FAILURE;
+ }
+
if (cc_len && (SUCCESS != http_send_cache_control(cache_control, cc_len))) {
return FAILURE;
}
if (cc_len && (SUCCESS != http_send_cache_control(cache_control, cc_len))) {
return FAILURE;
}