Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Abort page load and redirect?

by dave0 (Friar)
on Apr 09, 2005 at 19:36 UTC ( #446288=note: print w/replies, xml ) Need Help??

in reply to Abort page load and redirect?

Even assuming you're not printing anything before this, it won't work. You're printing two newlines at the end of your Content-type: header. This creates a blank line in your output, and in HTTP, a blank line indicates that headers are over and content begins on the following line. This should cause your Location: line to appear somewhere in the output document, rather than in the HTTP headers.

You shouldn't even need a Content-Type header with Location, anyway.

And, as said before,'s redirect() method is a nicer way to do this.

Replies are listed 'Best First'.
Re^2: Abort page load and redirect?
by ambs (Pilgrim) on Apr 09, 2005 at 19:39 UTC
    Correct. I noticed the two newlines but didn't noticed they were not needed (and incorrect) in this case. dave0++

    Alberto Simões

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2021-04-15 08:29 GMT
Find Nodes?
    Voting Booth?

    No recent polls found