From a7f62e5ccbcf22b56362f3d960170e2b85e78c16 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Tue, 25 Jun 2024 03:34:33 +0200 Subject: [PATCH] Allow specifying cookie max-age more conveniently. --- wrw/cookie.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrw/cookie.py b/wrw/cookie.py index c6e848f..029e692 100644 --- a/wrw/cookie.py +++ b/wrw/cookie.py @@ -31,6 +31,8 @@ class cookiedict(object): def add(self, name, value, **kw): self.codec[name] = value for key, value in kw.items(): + if key == "maxage": + key = "max-age" self.codec[name][key] = value def __setitem__(self, name, value): -- 2.11.0