summaryrefslogtreecommitdiff
path: root/Lib/http/cookies.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/http/cookies.py')
-rw-r--r--Lib/http/cookies.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py
index b2e995c0c4..6694f5478b 100644
--- a/Lib/http/cookies.py
+++ b/Lib/http/cookies.py
@@ -408,6 +408,8 @@ class Morsel(dict):
append("%s=%s" % (self._reserved[key], _getdate(value)))
elif key == "max-age" and isinstance(value, int):
append("%s=%d" % (self._reserved[key], value))
+ elif key == "comment" and isinstance(value, str):
+ append("%s=%s" % (self._reserved[key], _quote(value)))
elif key in self._flags:
if value:
append(str(self._reserved[key]))