Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions Lib/http/cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,29 +259,20 @@ class Morsel(dict):
This class also includes a coded_value attribute, which is used to hold
the network representation of the value.
"""
# RFC 2109 lists these attributes as reserved:
# path comment domain
# max-age secure version
#
# For historical reasons, these attributes are also reserved:
# expires
#
# This is an extension from Microsoft:
# httponly
#
# RFC 6265 lists these attributes as reserved:
# expires max-age domain
# path secure httponly

# This dictionary provides a mapping from the lowercase
# variant on the left to the appropriate traditional
# formatting on the right.
_reserved = {
"expires" : "expires",
"path" : "Path",
"comment" : "Comment",
"domain" : "Domain",
"max-age" : "Max-Age",
"domain" : "Domain",
"path" : "Path",
"secure" : "Secure",
"httponly" : "HttpOnly",
"version" : "Version",
"samesite" : "SameSite",
}

_flags = {'secure', 'httponly'}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
updated to RFC6265