- added INI setting http.force_exit which can be used to disable script termination
[m6w6/ext-http] / http_cache_api.c
index 11609f989fee4132832bc67c7144ff08ee569e13..322c509d2f5a8873a526a1be104f6b7fc8a9768f 100644 (file)
@@ -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;
        }