ChrisB: Wenn 2 identische Cookies mit unterschiedlichen Pfaden

Beitrag lesen

Hi,

Was ist das vorgeschriebene Verhalten für Cookies, die den gleichen Name haben. Welches der gleichen Cookies darf vom Client an den Server gesendet werden?

Alle die, deren path einen Präfix des Pfades der angeforderten Ressource darstellt.

RFC 2109 - HTTP State Management Mechanism:

The following rules apply to choosing applicable cookie-values from
   among all the cookies the user agent has.
   [...]

Path Selection
        The Path attribute of the cookie must match a prefix of the
        request-URI.

[...]

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.

MfG ChrisB

--
RGB is totally confusing - I mean, at least #C0FFEE should be brown, right?