[ python-Bugs-991258 ] Cookie.py loses 'secure' attribute

SourceForge.net noreply at sourceforge.net
Thu Jul 15 03:05:36 CEST 2004


Bugs item #991258, was opened at 2004-07-15 09:50
Message generated for change (Comment added) made by zenzen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=991258&group_id=5470

Category: Python Library
Group: Python 2.3
>Status: Deleted
Resolution: None
Priority: 5
Submitted By: Stuart Bishop (zenzen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cookie.py loses 'secure' attribute

Initial Comment:
SimpleCookie.load() happily parses a string with the 'secure' 
attribute, but loses it

>>> c = SimpleCookie()
>>> c['foo'] = 'bar'
>>> c['foo']['secure'] = True
>>> str(c)
'Set-Cookie: foo=bar; secure;'
>>> c = SimpleCookie(str(c))
>>> str(c)
'Set-Cookie: foo=bar;'
>>> c['foo']['secure']
''



----------------------------------------------------------------------

>Comment By: Stuart Bishop (zenzen)
Date: 2004-07-15 11:05

Message:
Logged In: YES 
user_id=46639

I think this is my misunderstanding - load() is designed to parse Cookie: 
headers from the client, and 'secure' only ever appears in Set-Cookie: 
headers from the server.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=991258&group_id=5470


More information about the Python-bugs-list mailing list