mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-991266: Fix quoting of Comment attribute of SimpleCookie (GH-6555)
This commit is contained in:
parent
b81ca28b37
commit
d5a2377c3d
3 changed files with 13 additions and 0 deletions
|
@ -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]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue