upgrade requests to v2.13.0 and pysocks to v1.6.6

This commit is contained in:
Alan Hamlett 2017-02-15 12:10:01 -08:00
parent 5dd9c1b07d
commit 4a3db76912
47 changed files with 11982 additions and 791 deletions

View file

@ -13,6 +13,8 @@ import copy
import time
import calendar
import collections
from ._internal_utils import to_native_string
from .compat import cookielib, urlparse, urlunparse, Morsel
try:
@ -55,7 +57,7 @@ class MockRequest(object):
if not self._r.headers.get('Host'):
return self._r.url
# If they did set it, retrieve it and reconstruct the expected domain
host = self._r.headers['Host']
host = to_native_string(self._r.headers['Host'], encoding='utf-8')
parsed = urlparse(self._r.url)
# Reconstruct the URL as we expect it
return urlunparse([