Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: failing to generate proper http redirect headers

by isotope (Deacon)
on Aug 29, 2003 at 19:47 UTC ( [id://287818]=note: print w/replies, xml ) Need Help??


in reply to failing to generate proper http redirect headers

This is what's wrong:
location: http://redirected_url
Location, like all other HTTP headers, must have the first letter capitalized. The reason it isn't is that you asked CGI to add a header called 'location' with that url as the content. Here are the examples from the CGI documentation:
print $query->redirect('http://somewhere.else/in/movie/land'); print $query->redirect(-uri=>'http://somewhere.else/in/movie/land', -nph=>1);
Note that uri is the correct named parameter, or the URI may be passed as the sole parameter.

--isotope

Replies are listed 'Best First'.
•Re: Re: failing to generate proper http redirect headers
by merlyn (Sage) on Aug 30, 2003 at 12:32 UTC
    Location, like all other HTTP headers, must have the first letter capitalized.
    No, headers are completely case-insensitive. They're based on RFC822 (the format for mail messages).

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      Ok, my mistake. Not only did he use the redirect method incorrectly, evidently he has a non-compliant browser.

      --isotope
        heh, the funny thing is my redirects from my CGI::Application subclasses work just fine, and I know that the CGI::App internals use the CGI.pm's redirect services.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-23 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found