You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2022/04/19 16:55:58 UTC

[GitHub] [thrift] fishy commented on a diff in pull request #2565: Fix bug in Python's THttpClient proxy handling

fishy commented on code in PR #2565:
URL: https://github.com/apache/thrift/pull/2565#discussion_r853294124


##########
lib/py/src/transport/THttpClient.py:
##########
@@ -100,7 +100,7 @@ def basic_proxy_auth_header(proxy):
         ap = "%s:%s" % (urllib.parse.unquote(proxy.username),
                         urllib.parse.unquote(proxy.password))
         cr = base64.b64encode(ap.encode()).strip()
-        return "Basic " + cr
+        return "Basic " + cr.decode()

Review Comment:
   this is a python 2 vs. 3 issue. the old code works in python 2 and the new code works in python 3. currently we still officially support both so you probably need to find a way to make it work in both 2 and 3 (maybe `six` can help in this case?)
   
   we do have a plan to drop python 2 support, so that won't be needed after we do that. but we just don't have the time to actually work on that yet (you are welcomed to take that on :) https://issues.apache.org/jira/browse/THRIFT-5537)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org