summaryrefslogtreecommitdiffstats
path: root/module/RequestFactory.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/RequestFactory.py')
-rw-r--r--module/RequestFactory.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/RequestFactory.py b/module/RequestFactory.py
index f66dfaf5d..975356254 100644
--- a/module/RequestFactory.py
+++ b/module/RequestFactory.py
@@ -21,6 +21,7 @@ from threading import Lock
from module.network.Request import Request
from module.network.XdccRequest import XdccRequest
from module.network.FtpRequest import FtpRequest
+from time import time
import pycurl
class RequestFactory():
@@ -81,3 +82,7 @@ class CookieJar():
def getCookie(self, name):
return self.parseCookie(name)
+
+ def setCookie(self, domain, name, value, path="/", exp=time()+3600*24*180):
+ s = ".%s TRUE %s FALSE %s %s %s" % (domain, path, exp, name, value)
+ self.cookies[name] = s