Craig Shelley wrote:
Hello again..


On Thu, 2003-09-04 at 14:21, Geoffrey Young wrote:

see Apache::SSI for mp1 - it does exactly what you are trying to do

and


is subclassable, so you can add your own tags/functionality if you want.


That is exactly what I am already doing. When using #exec directive I noticed I could not set the headers
properly.

typically, a subrequest gets its headers from the current request.


if you want to alter them, use $r->headers_in->set, but this is generally only used to test what-if scenarios: what if the current request had a cookie, could it access this document?

anyway, if you need that, then you could probably create your own subclass and override ssi_exec to simply set the incoming headers and then SUPER::ssi_exec.

or something like that (off the top of my head, anyway ;)



see recipe 5.7 in the mod_perl developer's cookbook for that, or look

at


the Apache::SSI source, which does it a different way.


That is something i have yet to get my hands on!

the book has a simpler example as well, but you should be able to figure out the important LWP bits from the online code example


http://www.modperlcookbook.org/code/ch05/Cookbook/SubRequestContent.pm

--Geoff



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to