On Feb 19, 2004, at 12:35 PM, Stas Bekman wrote: *snip*
I have a PerlPostReadRequestHandler running on a proxy server (using mod_proxy)
that wants to intercept/handle various requests directly while proxying others
normally.
[...]
I'd like to just call '$r->proxyreq(0)' to disable mod_proxy for this one request
and let my response handler do the right thing later on, but it seems to have no
effect. Any plans for this, or am I barking up the wrong tree here?

I think what you need is to fixup the $->filename and $r->uri as well. Let me write some tests and see whether this works.

Thanks for the tip -- I set both $r->filename and $r->uri to match a <Location..>
section and got the results I wanted. As usual, you rock, Stas!


I also found that $r->proxyreq(0) now makes no difference to the browser as far
as I can tell from simple testing, though my access handler and response callback
-- set from the PerlPostReadRequestHandler mapping -- do see some differences in
$r as they run: absolute vs. relative filename & uri...


I need to look into Geoff's reply and see if I can make further improvements. I
played with setting my dispatch handler as a PerlTransHandler, but mod_proxy seems
to get in there first no matter how I setup the config file, so I got it in at the
PerlPostReadRequestHandler. But for what it's worth, examining proxyreq value in
later phases (access, response) it still reports =1, whether I '$r->proxyreq(0)' or
not. I'll respond more directly to Geoff's note if I have anything useful to report.
Thanks for the pointer to modperlcookbook (have it, use it, love it :)


Cheers,
-jd.


-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to