
djdesm at wm
Oct 9, 2008, 5:30 AM
Views: 443
Permalink
|
|
Internal redirect inside an input filter
|
|
I'm attempting to write an input filter that performs an internal redirect based on the contents of the cookies sent in the request headers. The problem I'm encountering is that the browser is receiving both the content for the original request, as well as the content generated by the internal redirect. Ideally, the browser would receive only the content generated from the internal redirect. Here is a sample filter I wrote while trying to solve this problem: package Test::Redirect; # a bunch of use statements sub handler : FilterRequestHandler { my $f = shift; # this is just any old uri $f->r->internal_redirect('/reverse'); return Apache2::Const::OK; } I've tried setting the filter's context to allow it to run only once, but if I do that, it never completes the request. Any ideas? Thanks, Dan
|