httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aryeh Katz" <>
Subject Re: ap_run_sub_req problem
Date Fri, 08 Aug 2003 14:22:29 GMT
I was wondering if the following in the filter documentation is a doc bug based 
on your comments below:

"The second case for sub-requests is when one sub-request is going to 
become the real request. This happens whenever a sub-request is created 
outside of a handler or filter, and NULL is passed as the next filter to the 
make_sub_request function."

This seems to imply that it is possible to pass a NULL for the filter, and still 
have it become the real request (which I assume is done in a method similar 
to run_sub_req).
Can you shed some light on this please?

> The NULL argument for the filter is *ONLY* to be used for testing
> subrequests that are not actually run to the client.  E.g.
> mod_autoindex uses the NULL arg to consider what files might be
> served, and if they are, in fact, actually valid content files, or if
> they have been protected or otherwise cannot be handled.
> You must pass the appropriate filter arg in order to pass the response
> through the filter stack back to the client.
> Look, instead, at mod_include.c or another module that actually serves
> the subrequest, for an example of the appropriate way to use this API.
> Bill
> At 02:37 PM 8/6/2003, Aryeh Katz wrote:
> >In certain circumstances, I need to do an internal redirect on the
> >client's request (without sending back a redirect to the client). I
> >tried using ap_sub_req_method_uri (specifying NULL for the filter),
> >and then ap_run_sub_req. I see that the content type of the new
> >request is correct (in my case, image/gif). However, when the request
> >is sent to the client, the content type is text/plain. Thus, the
> >reply to the client doesn't render properly. I suspect I am not
> >invoking ap_run_sub_req properly. Is there something I should know
> >about how to invoke run_sub_req? Thanks. Aryeh
> >
> >---
> >Aryeh Katz
> >Secured-Services Inc.

Aryeh Katz
Secured-Services Inc.

View raw message