httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: 2.0.34 - erratic behavior with autoindexes
Date Wed, 03 Apr 2002 00:07:11 GMT
On Tue, Apr 02, 2002 at 03:30:07PM -0800, Ryan Bloom wrote:
> > > We are talking about the main request flushing its
> > > buffers before it runs the request.
> > 
> > Um. How'd the buffers get filled before running the request?
> The problem is that the main request generates content, and that goes
> into the OLD_WRITE filter buffer.  Then it creates a sub-request.  If
> the sub-request doesn't use the same OLD_WRITE instance, you have a
> major bug.

Huh? No...

Let's say the main req created an OLD_WRITE and put some content in there.
Next, the sub-request inserts its own OLD_WRITE instance (which it won't,
but let's run with this). The subreq then starts jamming content into its
own OLD_WRITE. When the subreq goes away, an EOS will hit the OLD_WRITE in
the sub_req, which will flush the content on up to the main request. The
main request's OLD_WRITE will prepend its data, and continue flushing the
data down the pipe.

Now, the SUBREQ filter actually intercepts that EOS, but it does pass the
data along. The OLD_WRITEs are emptying their buffers properly.

Now, the real situation is that a second OLD_WRITE won't be added. When you
call ap_r*(), it will scan the entire chain looking for an existing
OLD_WRITE to be present. If it is there, then another won't be added. If the
filter is not at the top, it won't be used.

And lastly, remember the ordering of the filters. Even if the subreq inserts
stuff, the OLD_WRITE should always remain at the "top".


Greg Stein,

View raw message