Merge pull request #425 from Lukasa/develop

Issue #335: Accept unusual keys in cookies.
This commit is contained in:
Kenneth Reitz
2012-02-13 16:14:39 -08:00
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -80,3 +80,4 @@ Patches and Suggestions
- David Kemp
- Brendon Crawford
- Denis (Telofy)
- Cory Benfield (Lukasa)
+2 -1
View File
@@ -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',