Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3a441c1b
Commit
3a441c1b
authored
Apr 22, 2012
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Issue2193 - Allow ":" character in Cookie NAME values
parent
b8c0206b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
Lib/http/cookies.py
Lib/http/cookies.py
+1
-1
Lib/test/test_http_cookies.py
Lib/test/test_http_cookies.py
+9
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/http/cookies.py
View file @
3a441c1b
...
@@ -159,7 +159,7 @@ class CookieError(Exception):
...
@@ -159,7 +159,7 @@ class CookieError(Exception):
# _LegalChars is the list of chars which don't require "'s
# _LegalChars is the list of chars which don't require "'s
# _Translator hash-table for fast quoting
# _Translator hash-table for fast quoting
#
#
_LegalChars
=
string
.
ascii_letters
+
string
.
digits
+
"!#$%&'*+-.^_`|~"
_LegalChars
=
string
.
ascii_letters
+
string
.
digits
+
"!#$%&'*+-.^_`|~
:
"
_Translator
=
{
_Translator
=
{
'
\
000
'
:
'
\
\
000'
,
'
\
001
'
:
'
\
\
001'
,
'
\
002
'
:
'
\
\
002'
,
'
\
000
'
:
'
\
\
000'
,
'
\
001
'
:
'
\
\
001'
,
'
\
002
'
:
'
\
\
002'
,
'
\
003
'
:
'
\
\
003'
,
'
\
004
'
:
'
\
\
004'
,
'
\
005
'
:
'
\
\
005'
,
'
\
003
'
:
'
\
\
003'
,
'
\
004
'
:
'
\
\
004'
,
'
\
005
'
:
'
\
\
005'
,
...
...
Lib/test/test_http_cookies.py
View file @
3a441c1b
...
@@ -34,6 +34,15 @@ class CookieTests(unittest.TestCase):
...
@@ -34,6 +34,15 @@ class CookieTests(unittest.TestCase):
'dict'
:
{
'keebler'
:
'E=mc2'
},
'dict'
:
{
'keebler'
:
'E=mc2'
},
'repr'
:
"<SimpleCookie: keebler='E=mc2'>"
,
'repr'
:
"<SimpleCookie: keebler='E=mc2'>"
,
'output'
:
'Set-Cookie: keebler=E=mc2'
},
'output'
:
'Set-Cookie: keebler=E=mc2'
},
# Cookies with ':' character in their name. Though not mentioned in
# RFC, servers / browsers allow it.
{
'data'
:
'key:term=value:term'
,
'dict'
:
{
'key:term'
:
'value:term'
},
'repr'
:
"<SimpleCookie: key:term='value:term'>"
,
'output'
:
'Set-Cookie: key:term=value:term'
},
]
]
for
case
in
cases
:
for
case
in
cases
:
...
...
Misc/NEWS
View file @
3a441c1b
...
@@ -61,6 +61,8 @@ Core and Builtins
...
@@ -61,6 +61,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #2193: Allow ":" character in Cookie NAME values.
- Issue #14629: tokenizer.detect_encoding will specify the filename in the
- Issue #14629: tokenizer.detect_encoding will specify the filename in the
SyntaxError exception if found at readline.__self__.name.
SyntaxError exception if found at readline.__self__.name.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment