summaryrefslogtreecommitdiffstats
path: root/Lib/Cookie.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-09-06 19:28:11 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-09-06 19:28:11 (GMT)
commit6ac7d7c80b366033d36de6e0d84ee2b872b8b9a7 (patch)
treeddede4e77d2a1a7a5d5f346399738daa4361b00b /Lib/Cookie.py
parent810f807b1bc66c1179879911179be0df9a2462f8 (diff)
downloadcpython-6ac7d7c80b366033d36de6e0d84ee2b872b8b9a7.zip
cpython-6ac7d7c80b366033d36de6e0d84ee2b872b8b9a7.tar.gz
cpython-6ac7d7c80b366033d36de6e0d84ee2b872b8b9a7.tar.bz2
#1638033: add support for httponly on Cookie.Morsel
Reviewer: Benjamin
Diffstat (limited to 'Lib/Cookie.py')
-rw-r--r--Lib/Cookie.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/Cookie.py b/Lib/Cookie.py
index e1eb734..b2f7427 100644
--- a/Lib/Cookie.py
+++ b/Lib/Cookie.py
@@ -408,6 +408,9 @@ class Morsel(dict):
# For historical reasons, these attributes are also reserved:
# expires
#
+ # This is an extension from Microsoft:
+ # httponly
+ #
# This dictionary provides a mapping from the lowercase
# variant on the left to the appropriate traditional
# formatting on the right.
@@ -417,6 +420,7 @@ class Morsel(dict):
"domain" : "Domain",
"max-age" : "Max-Age",
"secure" : "secure",
+ "httponly" : "httponly",
"version" : "Version",
}
@@ -499,6 +503,8 @@ class Morsel(dict):
RA("%s=%d" % (self._reserved[K], V))
elif K == "secure":
RA(str(self._reserved[K]))
+ elif K == "httponly":
+ RA(str(self._reserved[K]))
else:
RA("%s=%s" % (self._reserved[K], V))