Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl
Internal redirect inside an input filter
 

Index | Next | Previous | View Flat


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

Subject User Time
Internal redirect inside an input filter djdesm at wm Oct 9, 2008, 5:30 AM
    Re: Internal redirect inside an input filter torsten.foertsch at gmx Oct 9, 2008, 5:50 AM
        Re: Internal redirect inside an input filter djdesm at wm Oct 9, 2008, 6:33 AM
    Re: Internal redirect inside an input filter torsten.foertsch at gmx Oct 9, 2008, 7:07 AM
        Re: Internal redirect inside an input filter djdesm at wm Oct 9, 2008, 7:54 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.