Added a helper function to cookie module to format expire dates properly.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 5 Aug 2012 05:40:56 +0000 (07:40 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 5 Aug 2012 05:40:56 +0000 (07:40 +0200)
wrw/cookie.py

index 16ddf81..4f5071a 100644 (file)
@@ -1,4 +1,5 @@
-import Cookie
+import Cookie, time
+import proto
 
 __all__ = ["cookies", "get", "add"]
 
@@ -43,3 +44,5 @@ def get(req, name, default = None):
 
 def add(req, name, value, **kw):
     cookies(req).add(name, value, **kw)
+
+cdate = proto.httpdate