aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'cgi')
-rw-r--r--cgi/framework.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/cgi/framework.py b/cgi/framework.py
index 2cfabe3..4a9a6e2 100644
--- a/cgi/framework.py
+++ b/cgi/framework.py
@@ -368,10 +368,16 @@ def deleteCookie(self, key):
"""
Copied from Colubrid
"""
+ if key not in self._cookies:
+ return # Cookie doesn't exist
if self._newcookies is None:
self._newcookies = SimpleCookie()
- if not key in self._newcookies:
- self._newcookies[key] = ""
+ self._newcookies[key] = ""
+ if self._cookies[key]["path"]:
+ self._newcookies[key]["path"] = self._cookies[key]["path"]
+ else:
+ self._newcookies[key]["path"] = "/"
+ self._newcookies[key]["domain"] = self._cookies[key]["domain"]
self._newcookies[key]["max-age"] = 0
def elapsed_time(seconds, suffixes=['y','w','d','h','m','s'], add_s=False, separator=' '):