You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@apache.org> on 2002/04/28 08:45:42 UTC
Re: cvs commit: httpd-2.0/modules/http http_request.c
On Sun, Apr 28, 2002 at 06:41:35AM -0000, jerenkrantz@apache.org wrote:
> jerenkrantz 02/04/27 23:41:35
>
> Modified: . CHANGES
> modules/http http_request.c
> Log:
> If a subreq added a filter (say INCLUDES) and the subreq was promoted via
> fast_redirect, the filter would still point at the subreq - rather than
> the original r. So, we must update any filters pointing at rr to be r.
>
> This would cause lots of problems with mod_include with mod_dir requests
> such as seen in PR 7966. mod_include would be unsetting the headers_out
> of rr instead of r. But, we disassociate rr->headers_out and r->headers_out.
> Therefore, the C-L header in r->headers_out would remain - even though it
> bears no relation to what we will be outputting - causing problems.
>
> This also now permits chunked-encoding of mod_dir/mod_include requests
> which could never happen before and fixes the content-length problem
> seen in PR 7966.
>
> As hinted at in PR 7966, there is a race condition - if for some reason
> the server stalls reading an included file (or even better, placing a
> sleep in the cgi-bin script!), the invalid C-L may get propogated to the
> client.
>
> (Note that internal_internal_redirect has this same code fragment.)
>
> PR: 7966
Brian et al,
I was (obviously) able to reproduce your problem with mod_dir and
mod_include. I had to put a sleep in my CGI script to trigger this.
Can you try this patch and see if this fixes it? I believe it
should.
Sander: If this looks good to Brian, we need to bump this into
2.0.36. -- justin
Re: cvs commit: httpd-2.0/modules/http http_request.c
Posted by Brian Havard <br...@kheldar.apana.org.au>.
On Sat, 27 Apr 2002 23:45:42 -0700, Justin Erenkrantz wrote:
>On Sun, Apr 28, 2002 at 06:41:35AM -0000, jerenkrantz@apache.org wrote:
>> jerenkrantz 02/04/27 23:41:35
>>
>> Modified: . CHANGES
>> modules/http http_request.c
>> Log:
>> If a subreq added a filter (say INCLUDES) and the subreq was promoted via
>> fast_redirect, the filter would still point at the subreq - rather than
>> the original r. So, we must update any filters pointing at rr to be r.
>>
>> This would cause lots of problems with mod_include with mod_dir requests
>> such as seen in PR 7966. mod_include would be unsetting the headers_out
>> of rr instead of r. But, we disassociate rr->headers_out and r->headers_out.
>> Therefore, the C-L header in r->headers_out would remain - even though it
>> bears no relation to what we will be outputting - causing problems.
>>
>> This also now permits chunked-encoding of mod_dir/mod_include requests
>> which could never happen before and fixes the content-length problem
>> seen in PR 7966.
>>
>> As hinted at in PR 7966, there is a race condition - if for some reason
>> the server stalls reading an included file (or even better, placing a
>> sleep in the cgi-bin script!), the invalid C-L may get propogated to the
>> client.
>>
>> (Note that internal_internal_redirect has this same code fragment.)
>>
>> PR: 7966
>
>Brian et al,
>
>I was (obviously) able to reproduce your problem with mod_dir and
>mod_include. I had to put a sleep in my CGI script to trigger this.
>
>Can you try this patch and see if this fixes it? I believe it
>should.
>
>Sander: If this looks good to Brian, we need to bump this into
>2.0.36. -- justin
That fixes the problem I was seeing, yes.
--
______________________________________________________________________________
| Brian Havard | "He is not the messiah! |
| brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian |
------------------------------------------------------------------------------