[New-bugs-announce] [issue31456] SimpleCookie fails to parse any cookie if an entry has whitespace in the name

Adam Davis report at bugs.python.org
Wed Sep 13 14:46:23 EDT 2017


New submission from Adam Davis:

```>>> from http.cookies import SimpleCookie
>>> cookie_string = "ASDF=stuff; ASDF space=more stuff"
>>> cookie = SimpleCookie()
>>> cookie.load(cookie_string)
>>> cookie.items()
dict_items([])
>>> cookie_string = "ASDF=stuff"
>>> cookie.load(cookie_string)
>>> cookie.items()
dict_items([('ASDF', <Morsel: ASDF=stuff>)])```

cookie.load should throw an error, or at least parse the cookies it can parse.

----------
components: Library (Lib)
messages: 302105
nosy: Adam Davis
priority: normal
severity: normal
status: open
title: SimpleCookie fails to parse any cookie if an entry has whitespace in the name
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31456>
_______________________________________


More information about the New-bugs-announce mailing list