You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2003/05/30 03:43:24 UTC

[PATCH] PR 18388 Set-Cookie header not honored on 304 (Not modified) status

Has anybody looked at this simple change?

Any concerns?


Re: [PATCH] PR 18388 Set-Cookie header not honored on 304 (Not modified) status

Posted by Jeff Trawick <tr...@attglobal.net>.
Greg Marr wrote:
>> I found some time to look for existing discussions on this... (should 
>> have done that earlier)...  It isn't valid to send Set-Cookie on a 304.
> 
> 
>> It is not valid to set a cookie in a 304 response.  Please see
>> section 10.3.5 of RFC2616.  That is the reason Apache explictly
>> lists headers that will be sent and why Set-Cookie isn't one of
>> them."
> 
> 
> I don't see how 10.3.5 says that Set-Cookie is invalid.  It says that 
> entity headers aren't allowed, but Set-Cookie isn't listed under the 
> Entity Header section.  (In fact, it isn't listed in the spec at all.)

For an interpretation of that section w.r.t. Set-Cookie by one of the 
authors of RFC 2616, refer to

http://hypermail.linklord.com/new-httpd.old/2001/Jun/0508.html


Re: [PATCH] PR 18388 Set-Cookie header not honored on 304 (Not modified) status

Posted by Greg Marr <gr...@alum.wpi.edu>.
>I found some time to look for existing discussions on this... 
> (should have done that earlier)...  It isn't valid to send 
>Set-Cookie on a 304.

>It is not valid to set a cookie in a 304 response.  Please see
>section 10.3.5 of RFC2616.  That is the reason Apache explictly
>lists headers that will be sent and why Set-Cookie isn't one of
>them."

I don't see how 10.3.5 says that Set-Cookie is invalid.  It says that 
entity headers aren't allowed, but Set-Cookie isn't listed under the 
Entity Header section.  (In fact, it isn't listed in the spec at all.)

I see that other people had the same thoughts in the first link.

Re: [PATCH] PR 18388 Set-Cookie header not honored on 304 (Not modified) status

Posted by Jeff Trawick <tr...@attglobal.net>.
I found some time to look for existing discussions on this...  (should 
have done that earlier)...  It isn't valid to send Set-Cookie on a 304.

links...

the recent 2.0 PR:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18388
(I just closed as invalid.)

1.3 PR that Marc Slemko closed stating that it was valid per section 
10.3.5 of RFC2616

http://bugs.apache.org/index.cgi/full/8970

existing open 1.3 PR:

http://bugs.apache.org/index.cgi/full/9608
(I just closed as a duplicate of 8970)

more discussion:

http://www.gossamer-threads.com/archive/mod_perl_C1/announce_F2/ANNOUNCE:_Apache-AuthenNTLM_0.15_P33656/
http://hypermail.linklord.com/new-httpd.old/2001/Jun/0508.html

Sorry to trouble you, Bill :)


Re: [PATCH] PR 18388 Set-Cookie header not honored on 304 (Not modified) status

Posted by Bill Stoddard <bi...@wstoddard.com>.
Jeff Trawick wrote:

> Has anybody looked at this simple change?
>
> Any concerns?

Here is the text of the bug report:
---------

RFC 2109 -- HTTP State Management, e.g. cookies -- does not specify whether
cookies should be returned on requests with HTTP status codes other than 200. 
However, the earlier Netscape cookie specification did state that cookies should
be returned on other status codes, specifically 304 (Not modified).

Returning cookies during a 304 or 302 (Redirect) is very useful for
authorization / access-management products.

Can you please enable the Set-Cookie header during a 304?

Code to change is line 1675 of /modules/http/http_protocol.c.

Thanks!
-------

+1 on returning a cookie header on a 304.

Bill