: > If a CGI outputs a Location: header, what is the default Status returned
: > to the browser in Apache 1.1.1+, is it 302?
: TELNET to the server's HTTP port and try it?
That's how I arrived at knowing that the status was 302 in Apache 1.1.1.
: Read the CGI spec at http://hoohoo.ncsa.uiuc.edu/
: Note the distinction between a Location that specified an absolute URL,
: and one that specified a virtual path. From what it says about the
: second one, it will clearly send status 200. The first one will be 30x
: but it doesn't make clear whether 301 or 302 will be used, AFAIR.
I'm talking about an absolute URL. Obviously an internal redirect would
not send Set-Cookie to the browser until the redirected-to script had
been run. The Set-Cookie does get sent after the execution of the
: > A while ago I had CGIs
: > dumping out Set-Cookie headers followed by Location headers, intending
: > a 302 Status, but not explicitly setting it, and what got sent instead
: > was a 200 and my Set-Cookie: headers were ignored.
: Do you suppose the cookies have anything to do with this? Surely
: the most elementary problem-solving technique would be to take them
: away and see what difference it made, if any.
The Set-Cookie header had nothing to do with it. The fact that Location
was returned caused the Set-Cookie header (and anything else I might have
dumped out) to be ignored.
: > I hacked the server
: > quickly to change this, but is the default now 302?
: You hacked the server, and now you ask _us_ what it will do: is
: this reasonable?
You misunderstand, or I was not clear enough, or something... when I made
this change, it was to Apache 1.0.0 or so. My question is has the default
behavior changed since then (ie in Apache 1.1.1).