Dan Horne wrote:
>> From: Mark Stosberg
>> Sent: Wednesday, 13 December 2006 11:12 a.m.
>>
>> I just discovered mod_perl's internal_redirect method.
> 
> Snip
>  
>> The code is also rather simple:
>>
>>         if ($ENV{MOD_PERL}) {
>>             my $r = Apache->request;
>>             $r->internal_redirect($url);
>>             use Apache::Constants 'OK';
>>             return OK;
>>         }
>>         else {
>>             $self->header_type('redirect');
>>             $self->header_props(
>>                 -url => $url
>>             );
>>         }
>>
> 
> Perhaps this could be added to CGI::Application::Plugin::Redirect if Cees is
> amenable?

I think that's a great idea, but this option should perhaps have a
different name or option, because the result is different:
The internal redirect keeps the same URL, the external one does not.

For my application, the difference is OK when switching between modperl
and CGI, but others it may not be acceptable for this behavior to be
automatic.

To add to the confusion, we sometimes talk about "internal redirects" in
the context of CGI::App, when we refer to one run mode making a tail
call to another run mode.

  Mark


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to