Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Failure to redirect when my CGI::Application powered site is used under mod_perl2

by skx (Parson)
on Aug 14, 2008 at 21:38 UTC ( #704433=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Failure to redirect when my CGI::Application powered site is used under mod_perl2
in thread Failure to redirect when my CGI::Application powered site is used under mod_perl2

To reply to myself it seems that I have two solutions:

  • Use CGI::Application::Plugin::Redirect
  • Update my code:
sub redirectURL { my ( $self, $url ) = (@_); $self->header_type('redirect'); $self->header_add( -url => $url , -status => 301 ); return; }

That redundent "return" seems to make things work properly in my demo and real application.

I guess the return value of "header_add" is causing problems ..

Steve
--


Comment on Re^3: Failure to redirect when my CGI::Application powered site is used under mod_perl2
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://704433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2015-07-03 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls