mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Accept unusual keys in cookies.
The Oreos module throws CookieErrors when it catches keys that have characters that shouldn't be in them, like colons and braces. Other services are happy to send out such keys, however. This commit makes requests non-standards compliant, just like everyone else is.
This commit is contained in:
@@ -80,3 +80,4 @@ Patches and Suggestions
|
||||
- David Kemp
|
||||
- Brendon Crawford
|
||||
- Denis (Telofy)
|
||||
- Cory Benfield (Lukasa)
|
||||
|
||||
@@ -252,7 +252,8 @@ class CookieError(Exception):
|
||||
# _LegalChars is the list of chars which don't require "'s
|
||||
# _Translator hash-table for fast quoting
|
||||
#
|
||||
_LegalChars = string.ascii_letters + string.digits + "!#$%&'*+-.^_`|~[]_"
|
||||
_LegalChars = ( string.ascii_letters + string.digits +
|
||||
"!#$%&'*+-.^_`|~[]_:{}" )
|
||||
_Translator = {
|
||||
'\000' : '\\000', '\001' : '\\001', '\002' : '\\002',
|
||||
'\003' : '\\003', '\004' : '\\004', '\005' : '\\005',
|
||||
|
||||
Reference in New Issue
Block a user