From: Michael Wallner Date: Mon, 27 Mar 2006 09:28:03 +0000 (+0000) Subject: - override INI(http.force_exit) when calling http_exit() in ob_etaghandler X-Git-Tag: RELEASE_1_0_0RC3~30 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=1da2a264d5f4acfced8f76c28636e58db39b30be;p=m6w6%2Fext-http - override INI(http.force_exit) when calling http_exit() in ob_etaghandler - check if ob is locked in http_exit() --- diff --git a/http_api.c b/http_api.c index 774e603..5946680 100644 --- a/http_api.c +++ b/http_api.c @@ -147,7 +147,9 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header return FAILURE; } - php_end_ob_buffers(0 TSRMLS_CC); + if (!OG(ob_lock)) { + php_end_ob_buffers(0 TSRMLS_CC); + } if ((SUCCESS == sapi_send_headers(TSRMLS_C)) && body) { PHPWRITE(body, strlen(body)); } diff --git a/http_cache_api.c b/http_cache_api.c index 582c3cc..8326564 100644 --- a/http_cache_api.c +++ b/http_cache_api.c @@ -230,6 +230,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); }