[ZCM] [ZC] 1524/ 4 Reject "cookies with paths other than / do not appear in REQUEST ?"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Oct 8 10:27:50 EDT 2004


Issue #1524 Update (Reject) "cookies with paths other than / do not appear in REQUEST ?"
 Status Rejected, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/1524

==============================================================
= Reject - Entry #4 by tseaver on Oct 8, 2004 10:27 am

 Status: Pending => Rejected

The HTTP cookie spec (RFC 2109)[1] dictates that the path
attribute of a cookie be *only* the path portion of the
URL:

   Path   Defaults to the path of the request URL that generated the
          Set-Cookie response, up to, but not including, the
          right-most /.

Therefore, *don't* include the scheme or nethost in your path, and pay careful attention to the trailing slash.

[1] http://www.w3.org/Protocols/rfc2109/rfc2109
________________________________________
= Comment - Entry #3 by shh on Oct 8, 2004 4:18 am

The cookie path is handled by the browser not by Zope (or *any* HTTP server for that matter).
________________________________________
= Comment - Entry #2 by ajung on Oct 8, 2004 1:38 am

Works for me as expected.
________________________________________
= Request - Entry #1 by Anonymous User on Oct 7, 2004 8:18 pm

When I use RESPONSE.setCookie(..., path='/'), REQUEST.cookies contains the cookie while browsing that site. 

But when I set path to something else - the site url, or the url of the page being browsed - REQUEST.cookies is always empty. Shouldn't it contain the cookie while browsing pages under the cookie's path ?

You can see this in action at http://zwiki.org/UserOptions . 
==============================================================



More information about the Zope-Collector-Monitor mailing list