fix false cookie encoding and output

This commit is contained in:
Raphael Deem
2017-10-05 22:20:36 -07:00
parent 086b5daa53
commit d876e3ed5c
2 changed files with 23 additions and 3 deletions

View File

@@ -98,7 +98,8 @@ class Cookie(dict):
def __setitem__(self, key, value):
if key not in self._keys:
raise KeyError("Unknown cookie property")
return super().__setitem__(key, value)
if value is not False:
return super().__setitem__(key, value)
def encode(self, encoding):
output = ['%s=%s' % (self.key, _quote(self.value))]