httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r725077 - /httpd/httpd/trunk/modules/http/http_request.c
Date Wed, 10 Dec 2008 13:01:31 GMT
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)



Mime
View raw message