X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_cache_api.c;h=322c509d2f5a8873a526a1be104f6b7fc8a9768f;hp=11609f989fee4132832bc67c7144ff08ee569e13;hb=8d25696948ed61d50c417275222117f43069ddd1;hpb=0e41acb9661b95484c212e349f83e34eb3fe84a2 diff --git a/http_cache_api.c b/http_cache_api.c index 11609f9..322c509 100644 --- 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; + if (SG(headers_sent)) { + 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; + if (SG(headers_sent)) { + return FAILURE; + } + if (cc_len && (SUCCESS != http_send_cache_control(cache_control, cc_len))) { return FAILURE; }