Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 5187 invoked from network); 10 Dec 2008 13:01:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2008 13:01:53 -0000 Received: (qmail 76761 invoked by uid 500); 10 Dec 2008 13:02:06 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 76562 invoked by uid 500); 10 Dec 2008 13:02:05 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 76553 invoked by uid 99); 10 Dec 2008 13:02:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2008 05:02:05 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2008 13:00:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0FCA023888F1; Wed, 10 Dec 2008 05:01:32 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r725077 - /httpd/httpd/trunk/modules/http/http_request.c Date: Wed, 10 Dec 2008 13:01:31 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081210130132.0FCA023888F1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Wed Dec 10 05:01:31 2008 New Revision: 725077 URL: http://svn.apache.org/viewvc?rev=725077&view=rev Log: Hopefully the final fix for the subreq/filter issue. The prob was that we at this point could still have some stale and incorrect refs when we adjusted the f-stack. So move the update earlier so when we adjust, we're affecting r. RŸdiger and Jim pretty much simultaneously :) Modified: httpd/httpd/trunk/modules/http/http_request.c Modified: httpd/httpd/trunk/modules/http/http_request.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_request.c?rev=725077&r1=725076&r2=725077&view=diff ============================================================================== --- httpd/httpd/trunk/modules/http/http_request.c (original) +++ httpd/httpd/trunk/modules/http/http_request.c Wed Dec 10 05:01:31 2008 @@ -518,6 +518,15 @@ r->output_filters = rr->output_filters; r->input_filters = rr->input_filters; + /* If any filters pointed at the now-defunct rr, we must point them + * at our "new" instance of r. In particular, some of rr's structures + * will now be bogus (say rr->headers_out). If a filter tried to modify + * their f->r structure when it is pointing to rr, the real request_rec + * will not get updated. Fix that here. + */ + update_r_in_filters(r->input_filters, rr, r); + update_r_in_filters(r->output_filters, rr, r); + if (r->main) { ap_add_output_filter_handle(ap_subreq_core_filter_handle, NULL, r, r->connection); @@ -541,20 +550,8 @@ } if (next && (next->frec == ap_subreq_core_filter_handle)) { ap_remove_output_filter(next); - if (next == r->output_filters) { - r->output_filters = r->output_filters->next; - } } } - - /* If any filters pointed at the now-defunct rr, we must point them - * at our "new" instance of r. In particular, some of rr's structures - * will now be bogus (say rr->headers_out). If a filter tried to modify - * their f->r structure when it is pointing to rr, the real request_rec - * will not get updated. Fix that here. - */ - update_r_in_filters(r->input_filters, rr, r); - update_r_in_filters(r->output_filters, rr, r); } AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r)