aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-01-31 20:46:48 -0500
committerJason R. Coombs <jaraco@jaraco.com>2019-01-31 20:46:48 -0500
commit260bbe545e15ea75782c540c421da6c0a67abfd5 (patch)
treeca6f87769ddd58dc9b899c1a167b9f9170f2dbb9
parent5133d86c3e71709f59fbb9c5b60577bcdb8a7698 (diff)
downloadexternal_python_setuptools-260bbe545e15ea75782c540c421da6c0a67abfd5.tar.gz
external_python_setuptools-260bbe545e15ea75782c540c421da6c0a67abfd5.tar.bz2
external_python_setuptools-260bbe545e15ea75782c540c421da6c0a67abfd5.zip
Ensure a specified port in package_index isn't lost in the parse/unparse of the URL when auth is present. Fixes #1663.
-rw-r--r--setuptools/package_index.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 7e9517ce..ea76c005 100644
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -1072,7 +1072,7 @@ def open_with_auth(url, opener=urllib.request.urlopen):
if auth:
auth = "Basic " + _encode_auth(auth)
- parts = scheme, parsed.hostname, path, params, query, frag
+ parts = scheme, netloc, path, params, query, frag
new_url = urllib.parse.urlunparse(parts)
request = urllib.request.Request(new_url)
request.add_header("Authorization", auth)