[ZCM] [ZC] 2345/ 4 Edit "Zope doesn't handle multiple cookies with the same id"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Fri, 24 Aug 2007 11:29:18 -0400
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #2345 Update (Edit) "Zope doesn't handle multiple cookies with the same id"
 Status Pending, Zope/bug low
To followup, visit:
  http://www.zope.org/Collectors/Zope/2345

==============================================================
= Edit - Entry #4 by ajung on Aug 24, 2007 11:29 am

 Changes: submitter email, edited transcript, importance (medium => low)
________________________________________
= Comment - Entry #3 by dom_1 on Aug 1, 2007 8:01 am

> = Comment - Entry #2 by dom_1 on Aug 1, 2007 12:03 am
> 
> > The first (i.e. most specific and therefore most relevant) cookie will be
> >   unavailable from Zope. 
> 
> ... that should probably read "...only the last (and therefore least
>   relevant) cookie will be available from Zope" (!)

Sorry for the noise here - the above statements were incorrect - Zope does return the most relevant cookie, just not all cookies holding the same id.  Consequently, this bug is far less problematic than first thought.
________________________________________
= Comment - Entry #2 by dom_1 on Aug 1, 2007 12:03 am

> The first (i.e. most specific and therefore most relevant) cookie will be
>   unavailable from Zope. This is a real problem when using cookie paths to
>   manage multiple sessions with differing data depending on the locale.

... that should probably read "...only the last (and therefore least relevant) cookie will be available from Zope" (!)
________________________________________
= Request - Entry #1 by dom_1 on Jul 31, 2007 11:57 pm

Zope stores cookies keyed by their id, but browsers can present two cookies with the same id, set at different paths:

from http://www.ietf.org/rfc/rfc2109.txt:

"If multiple cookies satisfy the criteria above, they are ordered in
   the Cookie header such that those with more specific Path attributes
   precede those with less specific.  Ordering with respect to other
   attributes (e.g., Domain) is unspecified."

The first (i.e. most specific and therefore most relevant) cookie will be unavailable from Zope. This is a real problem when using cookie paths to manage multiple sessions with differing data depending on the locale.
==============================================================