From 9c340ef86f1435fa696ad3446a9f576b43a0ce39 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 8 Mar 2004 03:16:13 +0000 Subject: [PATCH] MFH: Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). --- NEWS | 1 + sapi/apache2filter/sapi_apache2.c | 3 +++ sapi/apache2handler/sapi_apache2.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 2feea61176..8f6b753d05 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ PHP 4 NEWS (Ilia, naish at klanen dot net) - Fixed bug #27443 (defined() returns wrong type). (Derick) - Fixed bug #27437 (wrong freetype include inside GD library). (Ilia) +- Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). (Ilia) - Fixed bug #27421 (mbstring.func_overload should be system ini setting). (Ilia) - Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS) diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 46d446bf88..c668caecac 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -238,7 +238,10 @@ php_apache_sapi_flush(void *server_context) if (!server_context) return; + sapi_send_headers(TSRMLS_C); + ctx->r->status = SG(sapi_headers).http_response_code; + SG(headers_sent) = 1; f = ctx->f; diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 1859034372..46f3221322 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -261,6 +261,8 @@ php_apache_sapi_flush(void *server_context) r = ctx->r; brigade = ctx->brigade; + sapi_send_headers(TSRMLS_C); + r->status = SG(sapi_headers).http_response_code; SG(headers_sent) = 1; -- 2.50.1