Re: Custom Form using PerlHandler with redirection

[prev] [thread] [next] [Date index for 2005/02/10]

From: Geoffrey Young
Subject: Re: Custom Form using PerlHandler with redirection
Date: 12:38 on 10 Feb 2005

Pratik wrote:
>>tried on success authentication ..
>>$r->header_out('redirect.html');
>>return REDIRECT;
> 
> 
> Shouldn't you be doing :
> 
> use Apache::Constants qw(REDIRECT OK);
> [............]
> [............]
> $r->header_out(Location => 'redirect.html');

that would help :)  in cases like this, telnet is your friend, and would
certainly show if you had properly set the Location header for the redirect.

also, don't forget that Location is supposed to use an absolute URI (even
though we mostly cheat with relative ones like you have here).

> $r->status(REDIRECT);

you should only do this if you are running from a Registry script, not
directly from a PerlHandler

> $r->send_http_header;

since you are returning a non-OK status you should not be sending headers
like this.

HTH

--Geoff

Re: Custom Form using PerlHandler with redirection
Geoffrey Young 12:38 on 10 Feb 2005

Generated at 10:21 on 11 Feb 2005 by mariachi v0.52