Skip to content
Myr

Handle bytes and unicode URLs for netloc

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parent f7cb796 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:requests/utils.py+4 added-1 removed
114 unmodified lines
115116 ri = urlparse(url)117118 # Strip port numbers from netloc119 if isinstance(url, str):119 host = ri.netloc.split(':')[0]120 host = ri.netloc.split(u':')[0]121 else:122 host = ri.netloc.split(b':')[0]123124 try:125 _netrc = netrc(netrc_path).authenticators(host)126 if _netrc:
594 unmodified lines