X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_cache_api.c;h=7c748cc46023c73769fc5099bce37d003aed13bf;hp=582c3ccd455d764b26fcec0134ec58dff88080ea;hb=2f39230d83bdf816dcae52c7e5a1b019347f0e7b;hpb=9ba68660f21ea9481af483dffd666ae5bee72d11 diff --git a/http_cache_api.c b/http_cache_api.c index 582c3cc..7c748cc 100644 --- a/http_cache_api.c +++ b/http_cache_api.c @@ -63,8 +63,7 @@ PHP_HTTP_API time_t _http_last_modified(const void *data_ptr, http_send_mode dat { php_stream_statbuf ssb; - switch (data_mode) - { + switch (data_mode) { case SEND_DATA: return HTTP_GET_REQUEST_TIME(); case SEND_RSRC: return php_stream_stat((php_stream *) data_ptr, &ssb) ? 0 : ssb.sb.st_mtime; default: return php_stream_stat_path((char *) data_ptr, &ssb) ? 0 : ssb.sb.st_mtime; @@ -185,7 +184,7 @@ PHP_HTTP_API STATUS _http_start_ob_etaghandler(TSRMLS_D) } HTTP_G->etag.started = 1; - return php_start_ob_buffer_named("ob_etaghandler", HTTP_G->send.buffer_size, 1 TSRMLS_CC); + return php_start_ob_buffer_named("ob_etaghandler", HTTP_G->send.buffer_size, 0 TSRMLS_CC); } PHP_HTTP_API zend_bool _http_interrupt_ob_etaghandler(TSRMLS_D) @@ -230,6 +229,8 @@ void _http_ob_etaghandler(char *output, uint output_len, http_send_etag_ex(etag, strlen(etag), &sent_header); if (http_match_etag("HTTP_IF_NONE_MATCH", etag)) { + /* force exit; ob within ob does not work */ + HTTP_G->force_exit = 1; http_exit_ex(304, sent_header, etag, 0); }