You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2005/03/16 17:30:48 UTC
Subrequests should not inherit entity-header fields from the mainline
request
Joe Schaefer wrote:
> Greg Ames <gr...@remulak.net> writes:
>
> [...]
>
>
>>As it turns out, we clone all of the main request's input headers when
>>we create the subrequest, including C-L. Whacking the subrequest's
>>C-L header fixes the hang. Since the main request's body could also
>>have be chunked, we should probably remove the subrequest's
>>Transfer-Encoding header as well.
>
>
> Shouldn't you remove Content-Type also?
>
The problem is that the subrequest is inheriting entity-header fields from the mainline request (mainline
request was a POST). This patch should be generalised to remove all inherited entity-header fields from the
subrequest.
Bill
Re: Subrequests should not inherit entity-header fields from the
mainline request
Posted by Greg Ames <gr...@remulak.net>.
Paul Querna wrote:
> Bill Stoddard wrote:
>> The problem is that the subrequest is inheriting entity-header fields
>> from the mainline request (mainline request was a POST). This patch
>> should be generalised to remove all inherited entity-header fields
>> from the subrequest.
>
>
> Something that popped into my mind is, what about when you actually want
> to do a POST subrequest?
from ap_set_sub_req_protocol():
rnew->method = "GET";
rnew->method_number = M_GET;
rnew->protocol = "INCLUDED";
...so I say we drive off that bridge when we get to it, to mis-quote Ted Kennedy.
Greg
Re: Subrequests should not inherit entity-header fields from the
mainline request
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Paul Querna <ch...@force-elite.com> writes:
[...]
> Something that popped into my mind is, what about when you actually
> want to do a POST subrequest?
This is exactly what I've been struggling with in apreq.
I think the only sane thing apreq can do is to assume that
subrequests will never have bodies attached (so no POST data
will ever be available to a subrequest via apreq). I think
this is the original intent, and that the input filter cloning
is just there to prevent segfaults (e.g. the subrequest might
install new filters for itself).
--
Joe Schaefer
Re: Subrequests should not inherit entity-header fields from the
mainline request
Posted by Paul Querna <ch...@force-elite.com>.
Bill Stoddard wrote:
> Joe Schaefer wrote:
>
>> Greg Ames <gr...@remulak.net> writes:
>>
>> [...]
>>
>>
>>> As it turns out, we clone all of the main request's input headers when
>>> we create the subrequest, including C-L. Whacking the subrequest's
>>> C-L header fixes the hang. Since the main request's body could also
>>> have be chunked, we should probably remove the subrequest's
>>> Transfer-Encoding header as well.
>>
>>
>>
>> Shouldn't you remove Content-Type also?
>>
>
> The problem is that the subrequest is inheriting entity-header fields
> from the mainline request (mainline request was a POST). This patch
> should be generalised to remove all inherited entity-header fields from
> the subrequest.
Something that popped into my mind is, what about when you actually want
to do a POST subrequest?
I think it would be quite hard with how subrequests are currently
constructed. I wish the all of the subrequest stuff could be refactored...
-Paul
Re: Subrequests should not inherit entity-header fields from the
mainline request
Posted by Greg Ames <gr...@remulak.net>.
Bill Stoddard wrote:
> Joe Schaefer wrote:
>>> As it turns out, we clone all of the main request's input headers when
>>> we create the subrequest, including C-L. Whacking the subrequest's
>>> C-L header fixes the hang. Since the main request's body could also
>>> have be chunked, we should probably remove the subrequest's
>>> Transfer-Encoding header as well.
>> Shouldn't you remove Content-Type also?
> The problem is that the subrequest is inheriting entity-header fields
> from the mainline request (mainline request was a POST). This patch
> should be generalised to remove all inherited entity-header fields from
> the subrequest.
done (rev 159410). thanks for the tip.
Greg