rjahrman has asked for the wisdom of the Perl Monks concerning the following question:

My header is like this:

Set-Cookie: trackerlogin=asdf%7Casdf; path=/; expires=Sun, 04-Jan-2004 23:40:12 GMT
Location: compiledb.pl?runonce=yes
(this is a blank line)

Why's this invalid?

Replies are listed 'Best First'.
Re: Why's this an invalid header?
by jasonk (Parson) on Jan 05, 2004 at 01:58 UTC

    The HTTP/1.1 spec specifies that the Location: header contains an absolute URI, not a relative one, although many browsers will work with relative URIs anyway. Maybe if you provided some real information (such as what kind of error you are getting that makes you think it's invalid) you might get more help.


    We're not surrounded, we're in a target-rich environment!
Re: Why's this an invalid header?
by cLive ;-) (Prior) on Jan 05, 2004 at 05:47 UTC

    Also, location header can't be sent with a Set-Cookie header. I'm pretty certain that Location is a stand alone header (sorry, can't confirm, my bibles are at work :) and that if you set it, most other headers are ignored or invalid.

    .02

    cLive ;-)