summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/network
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-29 12:18:51 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-29 12:18:51 +0100
commitd007aac6244a63ee49cf155de3c8af1b4b94d4c3 (patch)
treefb0f71e203841a7867fd405a5ff4a3b71dd3e646 /pyload/plugins/network
parentdisabled colored log on windows (diff)
downloadpyload-d007aac6244a63ee49cf155de3c8af1b4b94d4c3.tar.xz
added auth to request class
Diffstat (limited to 'pyload/plugins/network')
-rw-r--r--pyload/plugins/network/CurlRequest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyload/plugins/network/CurlRequest.py b/pyload/plugins/network/CurlRequest.py
index 717590ac5..03c049cf5 100644
--- a/pyload/plugins/network/CurlRequest.py
+++ b/pyload/plugins/network/CurlRequest.py
@@ -63,7 +63,7 @@ class CurlRequest(Request):
self.c.setopt(pycurl.WRITEFUNCTION, self.write)
self.c.setopt(pycurl.HEADERFUNCTION, self.writeHeader)
- # TODO: addAuth, addHeader
+ # TODO: addHeader
@property
def http(self):
@@ -138,6 +138,9 @@ class CurlRequest(Request):
if "timeout" in options:
self.c.setopt(pycurl.LOW_SPEED_TIME, options["timeout"])
+ if "auth" in options:
+ self.c.setopt(pycurl.USERPWD, str(options["auth"]))
+
def initOptions(self, options):
""" Sets same options as available in pycurl """
for k, v in options.iteritems():