summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/network
diff options
context:
space:
mode:
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():