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
bd341629
Commit
bd341629
authored
Jan 16, 2015
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
capitialize "HttpOnly" and "Secure" as they appear in the standard and other impls (closes #23250)
Patch by Jon Dufresne.
parent
f716d8b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
Lib/http/cookies.py
Lib/http/cookies.py
+2
-2
Lib/test/test_http_cookies.py
Lib/test/test_http_cookies.py
+2
-2
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/http/cookies.py
View file @
bd341629
...
...
@@ -330,8 +330,8 @@ class Morsel(dict):
"comment"
:
"Comment"
,
"domain"
:
"Domain"
,
"max-age"
:
"Max-Age"
,
"secure"
:
"
s
ecure"
,
"httponly"
:
"
httpo
nly"
,
"secure"
:
"
S
ecure"
,
"httponly"
:
"
HttpO
nly"
,
"version"
:
"Version"
,
}
...
...
Lib/test/test_http_cookies.py
View file @
bd341629
...
...
@@ -114,7 +114,7 @@ class CookieTests(unittest.TestCase):
C
[
'Customer'
][
'secure'
]
=
True
C
[
'Customer'
][
'httponly'
]
=
True
self
.
assertEqual
(
C
.
output
(),
'Set-Cookie: Customer="WILE_E_COYOTE";
httponly; s
ecure'
)
'Set-Cookie: Customer="WILE_E_COYOTE";
HttpOnly; S
ecure'
)
def
test_secure_httponly_false_if_not_present
(
self
):
C
=
cookies
.
SimpleCookie
()
...
...
@@ -152,7 +152,7 @@ class CookieTests(unittest.TestCase):
C
=
cookies
.
SimpleCookie
()
C
.
load
(
'eggs = scrambled ; secure ; path = bar ; foo=foo '
)
self
.
assertEqual
(
C
.
output
(),
'Set-Cookie: eggs=scrambled; Path=bar;
s
ecure
\
r
\
n
Set-Cookie: foo=foo'
)
'Set-Cookie: eggs=scrambled; Path=bar;
S
ecure
\
r
\
n
Set-Cookie: foo=foo'
)
def
test_quoted_meta
(
self
):
# Try cookie with quoted meta-data
...
...
Misc/NEWS
View file @
bd341629
...
...
@@ -44,6 +44,9 @@ Core and Builtins
Library
-------
- Issue #23250: In the http.cookies module, capitalize "HttpOnly" and "Secure"
as they are written in the standard.
- Issue #23063: In the disutils'
check
command
,
fix
parsing
of
reST
with
code
or
code
-
block
directives
.
...
...
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