[mod_python] How do you make a subrequest?

Scott Sanders sanders at apache.org
Thu Jan 20 14:07:19 EST 2005


I don't think that is what req.internal_redirect() does.  I want the 
main request and the sub request to participate in the output, for 
example, a server side include:

Main request puts out the html header information, then calls a sub 
request to put out the menu html, then the main request takes over 
again and outputs the rest of the page, etc.

I really need the sub request to return it content to me, and not to 
the user.  With internal_redirect(), the original request loses control 
over the process, when I would like it to participate again.

Scott

On Jan 19, 2005, at 6:56 PM, Gregory (Grisha) Trubetskoy wrote:

>
> Sounds exactly like what req.internal_redirect() does.
>
> Or if your goal is to somehow transform the output of the [sub] 
> request, then might a filter be the answer?
>
> Grisha
>
> On Wed, 19 Jan 2005, Scott Sanders wrote:
>
>> I want to make a subrequest to a URI, but not as a redirect, more 
>> like an include.  The sub request would return the result of the 
>> request as a string. Is there a way to do this?  I assume it is 
>> doable in the Apache API.  Even a pointer to some other apache 
>> module's c code that does it would be helpful.
>>
>> Thanks
>> Scott Sanders
>>
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>



More information about the Mod_python mailing list