Skip to content

Commit 9a8e5e4

Browse files
committed
Merge commit 'df23c'
2 parents 7fd1788 + df23c03 commit 9a8e5e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tornado/curl_httpclient.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,10 @@ def ioctl(cmd):
383383
else:
384384
curl.setopt(pycurl.INFILESIZE, len(request.body))
385385

386-
if request.auth_username and request.auth_password:
387-
userpwd = "%s:%s" % (request.auth_username, request.auth_password)
386+
if request.auth_username is not None:
387+
userpwd = "%s:%s" % (request.auth_username, request.auth_password or '')
388388
curl.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC)
389-
curl.setopt(pycurl.USERPWD, userpwd)
389+
curl.setopt(pycurl.USERPWD, utf8(userpwd))
390390
logging.debug("%s %s (username: %r)", request.method, request.url,
391391
request.auth_username)
392392
else:

0 commit comments

Comments
 (0)