Commits

zsp042 committed ddef280 Draft

update on line

Comments (0)

Files changed (1)

     morsel = self._new_cookie[name]
     if domain:
         morsel["domain"] = domain
+    if not expires and not expires_days:
+        expires_days = 999
     if expires_days is not None and not expires:
         expires = datetime.datetime.utcnow() + datetime.timedelta(
             days=expires_days)
         timestamp = calendar.timegm(expires.utctimetuple())
         morsel["expires"] = email.utils.formatdate(
             timestamp, localtime=False, usegmt=True)
-    else:
-        morsel['expires'] = 'Tue, 01 Jan 2030 00:00:00 GMT'
+
+
     if path:
         morsel["path"] = path
     for k, v in kwargs.iteritems():