:bug: Bug in proxy setting
LucaMingarelli opened this issue · comments
This seems to be a bug
def basic_proxy_auth_header(proxy):
if proxy is None or not proxy.username:
return None
ap = "%s:%s" % (urllib.parse.unquote(proxy.username),
urllib.parse.unquote(proxy.password))
cr = base64.b64encode(ap).strip()
return "Basic " + cr
ap
here is a string hence base64.b64encode(ap)
fails as it expects bytes (e.g. ap.encode()
?)
Also not sure about the purpose of the strip on a byte object - it has no effect.