httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 17629] filter handling issues with subrequests and internal redirects
Date Sun, 23 May 2010 11:28:02 GMT

--- Comment #38 from Alex Docauer <> 2010-05-23 07:27:56 EDT ---
I don't think Stefan's patch applies to bug 49328, as he is patching
internal_internal_redirect and ap_internal_fast_redirect, which is called by
mod_cgi(d) and/or mod_fastcgi.  In my example, no CGIs are used to repeat the
incorrect behavior. mod_include is calling make_sub_request directly, not
making internal redirects.

However, I think it's quite possible these bugs might be endemic of the same
underlying design decision.  It seems that there are a number of cases where
one would want to operate only on the filters that were pushed during the
current subrequest and not any filters that we inherited from a parent request.
In bug 49328, only the filters that were added in the subrequest should have
had their filter_init_func called, but the filters inherited from the parent
are re-initialized along with the new ones.  In bug 17629, only the filters
that were added to the request that triggered the redirect should be removed,
but since all of the filters except the protocol filters are removed, the data
generated by the redirect gets passed straight to the protocol filters instead
of first passing through its parent filters.

That being said, I don't think that Stephan's patch correctly handles all cases
of internal redirects, even through it does happen to work for the case listed
in this bug.  Instead of special-casing the behavior based on whether the
current request is a main request or a subrequest, it should simply copy the
parent request's filters (which would just consist of the protocol filters if
we are the main request) into the subrequest, thus discarding any filters added
in the current request.

I think implementing the fix in such a way would at least entail creating new
fields in the request_rec that represent the lists of input and output filters
copied from the parent, establishing new invariants for how these lists should
be treated, and then modification of request-handling logic in several files to
take these new lists into account.

Such a fix may also address bug 43939, which I suspect is being cause by an
internal redirect in mod_dir.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message