ASF Bugzilla – Attachment 25544 Details for
Bug 17629
filter handling issues with subrequests and internal redirects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
pr17629.diff (text/plain), 2.50 KB, created by
Joe Orton
on 2010-06-08 05:20:45 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Joe Orton
Created:
2010-06-08 05:20:45 UTC
Size:
2.50 KB
patch
obsolete
>Index: modules/http/http_request.c >=================================================================== >--- modules/http/http_request.c (revision 952555) >+++ modules/http/http_request.c (working copy) >@@ -460,17 +460,47 @@ > new->proto_output_filters = r->proto_output_filters; > new->proto_input_filters = r->proto_input_filters; > >- new->output_filters = new->proto_output_filters; > new->input_filters = new->proto_input_filters; > > if (new->main) { >- /* Add back the subrequest filter, which we lost when >- * we set output_filters to include only the protocol >- * output filters from the original request. >- */ >- ap_add_output_filter_handle(ap_subreq_core_filter_handle, >- NULL, new, new->connection); >+ ap_filter_t *f, *nextf; >+ >+ /* If this is a subrequest, the filter chain may contain a >+ * mixture of filters specific to the old request (r), and >+ * some inherited from r->main. Here, inherit that filter >+ * chain, and remove all those which are specific to the old >+ * request; ensuring the subreq filter is left in place. */ >+ new->output_filters = r->output_filters; >+ >+ f = new->output_filters; >+ do { >+ nextf = f->next; >+ >+ if (f->r == r && f->frec != ap_subreq_core_filter_handle) { >+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, >+ "dropping filter '%s' in internal redirect from %s to %s", >+ f->frec->name, r->unparsed_uri, new_uri); >+ >+ /* To remove the filter, first set f->r to the *new* >+ * request_rec, so that ->output_filters on 'new' is >+ * changed (if necessary) when removing the filter. */ >+ f->r = new; >+ ap_remove_output_filter(f); >+ } >+ >+ f = nextf; >+ >+ /* Stop at the protocol filters. If a protocol filter has >+ * been newly installed for this resource, better leave it >+ * in place, though it's probably a misconfiguration or >+ * filter bug to get into this state. */ >+ } while (f && f != new->proto_output_filters); > } >+ else { >+ /* If this is not a subrequest, clear out all >+ * resource-specific filters. */ >+ new->output_filters = new->proto_output_filters; >+ } > > update_r_in_filters(new->input_filters, r, new); > update_r_in_filters(new->output_filters, r, new);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 17629
:
25350
| 25544