diff --git a/.travis.yml b/.travis.yml index ca52bf2681..fcea6cb174 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ notifications: env: global: - PYTHONWARNINGS=always::DeprecationWarning + - CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 - PYPI_USERNAME=urllib3 # PYPI_PASSWORD is set in Travis control panel. diff --git a/ci/install.sh b/ci/install.sh index adda3d13cb..20bd477c6c 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -8,7 +8,7 @@ set -exo pipefail # we're in one of the Travis Python 2 sessions and sets up the Python 3 install # for Nox. if ! python3 -m pip --version; then - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py + curl https://bootstrap.pypa.io/3.5/get-pip.py -o get-pip.py sudo python3 get-pip.py # https://github.com/theacodes/nox/issues/328 sudo python3 -m pip install nox==2019.11.9 diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py index d2d456fb3c..9066e6ade4 100644 --- a/src/urllib3/connection.py +++ b/src/urllib3/connection.py @@ -215,7 +215,7 @@ def putrequest(self, method, url, *args, **kwargs): def putheader(self, header, *values): """""" - if SKIP_HEADER not in values: + if not any(isinstance(v, str) and v == SKIP_HEADER for v in values): _HTTPConnection.putheader(self, header, *values) elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS: raise ValueError(