httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <>
Subject Re: Subrequests reading bodies?
Date Tue, 04 Jun 2002 06:07:38 GMT
On Mon, Jun 03, 2002 at 05:16:13PM -0700, Greg Stein wrote:
> You might end up doing an "internal redirect" or somesuch to a subrequest to
> have it process the thing. In which case, it is perfectly acceptable for
> that guy to read the body.

Well, for an internal redirect, the request is "promoted" to not
be a subrequest - the r->main value populates to new->main (see
internal_internal_redirect).  So, I believe that's not where we're
concerned - this takes care of mod_dir, mod_negotiation,
mod_redirect, etc.

> The basic story is that if you "run" a subrequest, then it can (and probably
> *should*) consume the body. If you mere prepare a subrequest (so that you
> can look at the status of that prep), then it should absolute *not* read the
> body.

The exception seems to be mod_include as a module like mod_autoindex
doesn't get a chance to run its subreq handlers:

<!--#exec cgi="/cgi-bin/foo.cgi"-->

So, should the cgi_handler have access to the request body?  What if
I do the following:

<!--#exec cgi="/cgi-bin/foo.cgi"-->
<!--#exec cgi="/cgi-bin/foo.cgi"-->

What happens here?  Do they get the same body?  Does the first one
only get the body?  Do none of them get input?  -- justin

View raw message