Open agraul opened 2 years ago
AFAICS, the urlparser.parse
function seems currently expected to always return bytes, as we always take the input url and pass it _to_utf8
to ensure we have bytes and not a string.
So, when parsing, we expect schema
and parts to be bytes. I see the rest of the functions are taking this into account, but it seems there is a bug in the logic for find_proxy
which is not doing the proper comparison, making it to fail assigning the right proxy.
Hi, I think the current behavior of
urlparser.parse
could be improved. Using Python 3, right now it always returnsbytes
for theurl
and allparts
, ignoring if the input is astr
orbytes
. That's especially surprising because one consequence is thatfind_proxies
does not work onparts[0]
(which is thescheme
). Below is an isolated reproducer: