From: Karlis Lauva Date: Fri, 9 Aug 2013 10:43:20 +0000 (+0300) Subject: Allow deleting all cookies on custom domains X-Git-Tag: v3.2.0b1~97^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F873%2Fhead;p=thirdparty%2Ftornado.git Allow deleting all cookies on custom domains --- diff --git a/tornado/web.py b/tornado/web.py index c33c923f4..1332924cd 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -442,10 +442,10 @@ class RequestHandler(object): self.set_cookie(name, value="", path=path, expires=expires, domain=domain) - def clear_all_cookies(self): + def clear_all_cookies(self, path="/", domain=None): """Deletes all the cookies the user sent with this request.""" for name in self.request.cookies: - self.clear_cookie(name) + self.clear_cookie(name, path=path, domain=domain) def set_secure_cookie(self, name, value, expires_days=30, **kwargs): """Signs and timestamps a cookie so it cannot be forged.