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 occurrence of PHPSTR_LEN(x) = 0;
[m6w6/ext-http]
/
http_cache_api.c
diff --git
a/http_cache_api.c
b/http_cache_api.c
index 11609f989fee4132832bc67c7144ff08ee569e13..322c509d2f5a8873a526a1be104f6b7fc8a9768f 100644
(file)
--- a/
http_cache_api.c
+++ b/
http_cache_api.c
@@
-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;
}