httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ics.uci.edu>
Subject Re: general/2615: Set-Cookie not sent with Redirect response
Date Wed, 23 Dec 1998 01:16:07 GMT
>Hrm..  Are you sure about that?  I use the normal r->headers_out for both
>my cookies and my redirect and it works fine.  The code looks something
>like this (with all sorts of gunk removed):
>
>   table_set(r->headers_out, "Location", location_str);
>   r->status = REDIRECT;
>   table_add(r->headers_out, "Set-Cookie", cookie_str);
>   send_http_header(r);

That's because you are crafting your own response rather than using the
canned response generator in http_protocol.c (ap_send_error_response)
that gets used when a module returns REDIRECT.

>So it definitely gets sent on a 302.  That brings up another question.
>REDIRECT is defined to be HTTP_MOVED_TEMPORARILY which is 302.  How is
>that different from HTTP_TEMPORARY_REDIRECT 307?  I never really
>understood that, but didn't care because it seemed to work.

307 was defined as a supposedly unambiguous version of 302 regarding
whether or not the redirected request should be a GET or the same method
as the orginal request.  *shrug*

....Roy

Mime
View raw message