Skip to content
Myr

Merge pull request #2038 from dstufft/update-urllib3

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

Update urllib3 to 4fb351cd2

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 07f9a7e, 626c48e · Browse files · 3 files+15 added−8 removed
This commit

State

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

Diff stats

3 files+15 added−8 removed

  • other:+15 added−8 removed

3 files+15 added−8 removed

modified:requests/packages/urllib3/__init__.py+1 added-1 removed
8 unmodified lines
9"""1011__author__ = 'Andrey Petrov (andrey.petrov@shazow.net)'12__license__ = 'MIT'13__version__ = '1.8.2'13__version__ = 'dev'141516from .connectionpool import (17 HTTPConnectionPool,
41 unmodified lines
modified:requests/packages/urllib3/connection.py+13 added-6 removed
93 unmodified lines
94 return conn9596 def _prepare_conn(self, conn):97 self.sock = conn98 if self._tunnel_host:98 # the _tunnel_host attribute was added in python 2.6.3 (via99 # http://hg.python.org/cpython/rev/0f57b30a152f) so pythons 2.6(0-2) do100 # not have them.101 if getattr(self, '_tunnel_host', None):102 # TODO: Fix tunnel so it doesn't depend on self.sock state.103 self._tunnel()104105 def connect(self):
61 unmodified lines
167168 resolved_cert_reqs = resolve_cert_reqs(self.cert_reqs)169 resolved_ssl_version = resolve_ssl_version(self.ssl_version)170168 # the _tunnel_host attribute was added in python 2.6.3 (via169 # http://hg.python.org/cpython/rev/0f57b30a152f) so pythons 2.6(0-2) do170 # not have them.171 hostname = self.host172 if getattr(self, '_tunnel_host', None):173 # _tunnel_host was added in Python 2.6.3174 # (See: http://hg.python.org/cpython/rev/0f57b30a152f)175176 self.sock = sock177 # Calls self._set_hostport(), so self.host is178 # self._tunnel_host below.179 self._tunnel()180181 # Override the host with the one we're requesting data from.182 hostname = self._tunnel_host183184 # Wrap socket using verification with the root certs in185 # trusted_root_certs186 self.sock = ssl_wrap_socket(sock, self.key_file, self.cert_file,187 cert_reqs=resolved_cert_reqs,188 ca_certs=self.ca_certs,182 server_hostname=self.host,189 server_hostname=hostname,190 ssl_version=resolved_ssl_version)191192 if resolved_cert_reqs != ssl.CERT_NONE:193 if self.assert_fingerprint:194 assert_fingerprint(self.sock.getpeercert(binary_form=True),195 self.assert_fingerprint)196 elif self.assert_hostname is not False:197 match_hostname(self.sock.getpeercert(),191 self.assert_hostname or self.host)198 self.assert_hostname or hostname)199200201if ssl:202 # Make a copy for testing.
2 unmodified lines
modified:requests/packages/urllib3/fields.py+1 added-1 removed
13 unmodified lines
14 """15 Guess the "Content-Type" of a file.1617 :param filename:18 The filename to guess the "Content-Type" of using :mod:`mimetimes`.18 The filename to guess the "Content-Type" of using :mod:`mimetypes`.19 :param default:20 If no "Content-Type" can be guessed, default to `default`.21 """22 if filename:
155 unmodified lines