]> granicus.if.org Git - php/commitdiff
MFH: Fixed regression #31645 - only flush before running the subrequest.
authorJoe Orton <jorton@php.net>
Mon, 24 Jan 2005 11:48:35 +0000 (11:48 +0000)
committerJoe Orton <jorton@php.net>
Mon, 24 Jan 2005 11:48:35 +0000 (11:48 +0000)
sapi/apache2handler/php_functions.c

index 1da5223e1b39df4a1c74e9487901bc4107a533ed..2763da0194ff1af2ceee805eee948618a73ec94e 100644 (file)
@@ -64,10 +64,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);
 }
 
@@ -100,6 +96,10 @@ PHP_FUNCTION(virtual)
        php_end_ob_buffers(1 TSRMLS_CC);
        php_header();
 
+       /* 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);