From b386cdbdd725ef5271019a05765e32ef45c95f81 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 24 Jan 2005 11:46:59 +0000 Subject: [PATCH] MFH: Fixed regression #31645 - only flush before running the subrequest. --- sapi/apache2handler/php_functions.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 631e56a1dd..20490b986a 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -66,10 +66,6 @@ static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC) ctx = SG(server_context); - /* Ensure that the ap_r* layer is flushed, to work around 2.0 bug: - * http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ - ap_rflush(ctx->r); - return ap_sub_req_lookup_uri(filename, ctx->r, ctx->r->output_filters); } @@ -102,6 +98,10 @@ PHP_FUNCTION(virtual) php_end_ob_buffers(1 TSRMLS_CC); php_header(TSRMLS_C); + /* Ensure that the ap_r* layer for the main request is flushed, to + * work around http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ + ap_rflush(rr->main); + if (ap_run_sub_req(rr)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - request execution failed", Z_STRVAL_PP(filename)); ap_destroy_sub_req(rr); -- 2.40.0