mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
Apply cookie date fix from adios
This commit is contained in:
parent
36b2a82561
commit
3d3edccdac
2 changed files with 6 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
* Swap order of buttons in Remove window (Closes #1083)
|
||||
* Change the compressed js script to deluge-all.js to avoid naming
|
||||
conflicts on case-sensitive filesystems.
|
||||
* Apply patch from adios fixing the cookie date
|
||||
|
||||
==== GtkUI ====
|
||||
* Attempt to register as the default magnet uri handler in GNOME on startup
|
||||
|
|
|
@ -51,6 +51,8 @@ import time
|
|||
import random
|
||||
import hashlib
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from email.utils import formatdate
|
||||
|
||||
from twisted.internet.defer import Deferred
|
||||
from twisted.internet.task import LoopingCall
|
||||
|
@ -82,9 +84,9 @@ def get_session_id(session_id):
|
|||
return None
|
||||
|
||||
def make_expires(timeout):
|
||||
expires = int(time.time()) + timeout
|
||||
expires_str = time.strftime('%a, %d %b %Y %H:%M:%S GMT',
|
||||
time.gmtime(expires))
|
||||
dt = timedelta(seconds=timeout)
|
||||
expires = time.mktime((datetime.now() + dt).timetuple())
|
||||
expires_str = formatdate(timeval=expires, localtime=False, usegmt=True)
|
||||
return expires, expires_str
|
||||
|
||||
class Auth(JSONComponent):
|
||||
|
|
Loading…
Add table
Reference in a new issue