diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-09-06 19:28:11 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-09-06 19:28:11 +0000 |
commit | 7859f18c1004bcca8531f30b783e602d67fce187 (patch) | |
tree | 6968fdd3a5b0844b0adb2b9fe1430568dbe709c1 /Lib/Cookie.py | |
parent | 7c6866d00ca2221e0dc027e700aa6acf4c63e1b6 (diff) | |
download | cpython-7859f18c1004bcca8531f30b783e602d67fce187.tar.gz |
#1638033: add support for httponly on Cookie.Morsel
Reviewer: Benjamin
Diffstat (limited to 'Lib/Cookie.py')
-rw-r--r-- | Lib/Cookie.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/Cookie.py b/Lib/Cookie.py index e1eb7348bc..b2f7427aa9 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)) |