This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Cookie.py loses 'secure' attribute
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: zenzen
Priority: normal Keywords:

Created on 2004-07-14 23:50 by zenzen, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg21615 - (view) Author: Stuart Bishop (zenzen) Date: 2004-07-14 23:50
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']
''

msg21616 - (view) Author: Stuart Bishop (zenzen) Date: 2004-07-15 01:05
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.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40568
2004-07-14 23:50:30zenzencreate