diff options
| -rwxr-xr-x | module/network/Request.py | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/module/network/Request.py b/module/network/Request.py index c6d6f0901..d1280f591 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -207,13 +207,14 @@ class Request:          self.auth = True          self.user = user          self.pw = pw - +         +        upwstr = str("%s:%s" % (user,pw))          if self.curl: -            self.pycurl.setopt(pycurl.HTTPHEADER, ['Authorization: Basic ' + base64.encodestring(user + ':' + pw)[:-1]]) -            self.pycurl.setopt(pycurl.USERPWD, user + ":" + pw) +            self.pycurl.setopt(pycurl.HTTPHEADER, ['Authorization: Basic ' + base64.encodestring(upwstr)[:-1]]) +            self.pycurl.setopt(pycurl.USERPWD, upwstr)              self.pycurl.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_ANY)          else: -            self.downloader.addheaders.append(['Authorization', 'Basic ' + base64.encodestring(user + ':' + pw)[:-1]]) +            self.downloader.addheaders.append(['Authorization', 'Basic ' + base64.encodestring(upwstr)[:-1]])      def add_cookies(self, req):          cookie_head = "" | 
