> I have a PerlPostReadRequestHandler running on a proxy server (using > mod_proxy) > that wants to intercept/handle various requests directly while proxying > others > normally. To achieve this I currently match against the > '$r->unparsed_uri()' and > actually clear PerlTransHandler ('$r->set_handlers(PerlTransHandler => > undef);')
that will only clear mod_perl translation handlers - mod_proxy's translation handler will still run. if you want to totally subvert the translation phase you need to set a handler that simply returns Apache::OK. > and set my response handler according to my match mapping. > > I'd like to just call '$r->proxyreq(0)' to disable mod_proxy for this > one request if you set that from a PerlPostReadRequestHandler it may be having no effect because both mod_perl and mod_proxy call use APR_HOOK_FIRST, so there is no guarantee that what you unset won't be reset by mod_proxy. it would be interesting to see the value for $r->proxyreq in a PerlTransHandler after you try to unset it. just a guess, though. nevertheless, you probably need to do your $r->proxyreq(0) logic in a PerlTransHandler. see, for example http://www.modperlcookbook.org/code/ch12/Cookbook/MirrorApache.pm which is recipe 12.5 in the book. while it's talking about Apache 1.3, you ought to be able to control 2.0 in pretty much the same way (the new map-to-storage logic might make things a bit different, but I don't think so). unfortunately, we don't have that chapter online - there are some explanations in there that might help clear things up a bit. HTH --Geoff -- 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