From: dave mankoff Date: Mon, 23 Jan 2012 13:33:51 +0000 (-0500) Subject: change encode('ascii') to utf8() X-Git-Tag: v2.2.0~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F442%2Fhead;p=thirdparty%2Ftornado.git change encode('ascii') to utf8() --- diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index 7d8faf36e..a338cb8d6 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -386,7 +386,7 @@ def _curl_setup_request(curl, request, buffer, headers): 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.encode('ascii')) + curl.setopt(pycurl.USERPWD, utf8(userpwd)) logging.debug("%s %s (username: %r)", request.method, request.url, request.auth_username) else: