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

2017-09-13 Thread Adam Davis

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', )])```

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 
<https://bugs.python.org/issue31456>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-10-10 Thread Adam Davis

Adam Davis  added the comment:

Quietly throw out the one bad value, sure. You lose all cookies in your cookie 
string in this scenario. 

I'd expect "ASDF=stuff; ASDF space=more stuff" to at least kick out the values 
that are legal.

--

___
Python tracker 
<https://bugs.python.org/issue31456>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com