]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #24177 (Status not set correctly after flush() in Apache 2)
authorIlia Alshanetsky <iliaa@php.net>
Sat, 2 Aug 2003 18:30:22 +0000 (18:30 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 2 Aug 2003 18:30:22 +0000 (18:30 +0000)
NEWS
sapi/apache2filter/sapi_apache2.c
sapi/apache2handler/sapi_apache2.c

diff --git a/NEWS b/NEWS
index 8ded101e50f8d1ae9875d3962b0e00e97cdd5843..e10117d94d2363c7bfe3158f54bc58f5f54f8c33 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP 4                                                                      NEWS
 ?? Aug 2003, Version 4.3.3RC3
 - Fixed bug #24883 (variables_order and gpc_order being ignored). (Ilia)
 - Fixed bug #24871 (methods misidentified as constructors). (Ilia)
+- Fixed bug #24177 (Status not set correctly after flush() in Apache 2). (Ilia)
 - Fixed bug #23509 (exit code lost when exit() called from 
   register_shutdown_function()). (Ilia)
 - Fixed bug #22154 (Possible crash when memory_limit is reached and
index 66fd5700bc3304637af23ae924d962ec84a4c329..0df31c78b9e687bac0a9ccc350a46e28e62fc2f5 100644 (file)
@@ -236,7 +236,9 @@ php_apache_sapi_flush(void *server_context)
         * then don't bother flushing. */
        if (!server_context)
                return;
-    
+
+       ctx->r->status = SG(sapi_headers).http_response_code;
+
        f = ctx->f;
 
        /* Send a flush bucket down the filter chain. The current default
index 1494a2f407d0f02dc2f4795cb623a8451d0abc3f..28ff1e3be633486dbf81181db1b63a3848d860db 100644 (file)
@@ -260,6 +260,8 @@ php_apache_sapi_flush(void *server_context)
        r = ctx->r;
        brigade = ctx->brigade;
 
+       r->status = SG(sapi_headers).http_response_code;
+
        /* Send a flush bucket down the filter chain. */
        bucket = apr_bucket_flush_create(r->connection->bucket_alloc);
        APR_BRIGADE_INSERT_TAIL(brigade, bucket);