Merge commit 'df23c'
This commit is contained in:
commit
9a8e5e4d86
|
@ -383,10 +383,10 @@ def _curl_setup_request(curl, request, buffer, headers):
|
|||
else:
|
||||
curl.setopt(pycurl.INFILESIZE, len(request.body))
|
||||
|
||||
if request.auth_username and request.auth_password:
|
||||
userpwd = "%s:%s" % (request.auth_username, request.auth_password)
|
||||
if request.auth_username is not None:
|
||||
userpwd = "%s:%s" % (request.auth_username, request.auth_password or '')
|
||||
curl.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC)
|
||||
curl.setopt(pycurl.USERPWD, userpwd)
|
||||
curl.setopt(pycurl.USERPWD, utf8(userpwd))
|
||||
logging.debug("%s %s (username: %r)", request.method, request.url,
|
||||
request.auth_username)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue