You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this kind of report you should provide more information. Is this an
enhancement to the Cookie object? Why is it needed?
Do you really propose that users directly use the _multi attribute
directly (the leading _ suggest an internal attribute)?
Also, some documentation update is necessary (in Doc/library/cookie.rst)
chch commented on Dec 19, 2009
chchmannequin
MannequinAuthor
More actions
This is fix for rare problem. If I set 2 cookies:
sid=pub.GHoBitAWLt, path="/"
sid=cab.S97jUfeihM, path="/cab"
All browsers in Cookie header send for any URL '/cab*':
sid=cab.S97jUfeihM; sid=pub.GHoBitAWLt
Current implementation always returns Cookie['sid']=pub.GHoBitAWLt - wrong!
My patch resolve this problem and Cookie['sid'] returns first (nearest/deepest in path) cookie value,
and also collects all same name cookies in dict Cookie._multi .
Name (_multi) may be wrong, and may be any other :o) .
Also I can update documentation, but my English is not so good ...
Unless you can quote something in the manual that says or implies that cookie.py should already have this feature, it looks like a feature request. Is it possible to add a new unittest? Prepare any new patches against py3k branch, now 'trunk'.
Activity
chch commentedon Dec 14, 2009
After setting cookies with same name and different path only nearest to
root cookie is available.
Attached patch:
order.
chch commentedon Dec 19, 2009
Remake for patch due the requirements of
http://www.python.org/dev/patches/
amauryfa commentedon Dec 19, 2009
For this kind of report you should provide more information. Is this an
enhancement to the Cookie object? Why is it needed?
Do you really propose that users directly use the _multi attribute
directly (the leading _ suggest an internal attribute)?
Also, some documentation update is necessary (in Doc/library/cookie.rst)
chch commentedon Dec 19, 2009
This is fix for rare problem. If I set 2 cookies:
sid=pub.GHoBitAWLt, path="/"
sid=cab.S97jUfeihM, path="/cab"
All browsers in Cookie header send for any URL '/cab*':
sid=cab.S97jUfeihM; sid=pub.GHoBitAWLt
Current implementation always returns Cookie['sid']=pub.GHoBitAWLt - wrong!
My patch resolve this problem and Cookie['sid'] returns first (nearest/deepest in path) cookie value,
and also collects all same name cookies in dict Cookie._multi .
Name (_multi) may be wrong, and may be any other :o) .
Also I can update documentation, but my English is not so good ...
terryjreedy commentedon Aug 4, 2010
Unless you can quote something in the manual that says or implies that cookie.py should already have this feature, it looks like a feature request. Is it possible to add a new unittest? Prepare any new patches against py3k branch, now 'trunk'.
chch commentedon Aug 4, 2010
Cookie.py contain error!
mmelin commentedon Feb 23, 2013
FYI, this looks like the same issue as bpo-1375011
terryjreedy commentedon Feb 23, 2013
Which also has patches.