+4
-4
lines changedFilter options
+4
-4
lines changed Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ def _identify_http_proxy_auth(self):
135
135
url = url[url.find(":") + 3:]
136
136
return "@" in url and len(url[:url.find('@')]) > 0
137
137
138
-
def _seperate_http_proxy_auth(self):
138
+
def _separate_http_proxy_auth(self):
139
139
url = self._proxy_url
140
140
protocol = url[:url.find(":") + 3]
141
141
no_protocol = url[len(protocol):]
@@ -156,7 +156,7 @@ def _get_connection_manager(self):
156
156
from urllib3.contrib.socks import SOCKSProxyManager
157
157
return SOCKSProxyManager(self._proxy_url, **pool_manager_init_args)
158
158
elif self._identify_http_proxy_auth():
159
-
self._proxy_url, self._basic_proxy_auth = self._seperate_http_proxy_auth()
159
+
self._proxy_url, self._basic_proxy_auth = self._separate_http_proxy_auth()
160
160
pool_manager_init_args['proxy_headers'] = urllib3.make_headers(
161
161
proxy_basic_auth=self._basic_proxy_auth)
162
162
return urllib3.ProxyManager(self._proxy_url, **pool_manager_init_args)
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ def test_get_proxy_url_none(mock_proxy_settings_missing):
72
72
def test_get_proxy_url_http_auth(mock_proxy_auth_settings):
73
73
remote_connection = RemoteConnection('http://remote', keep_alive=False)
74
74
proxy_url = remote_connection._get_proxy_url()
75
-
raw_proxy_url, basic_auth_string = remote_connection._seperate_http_proxy_auth()
75
+
raw_proxy_url, basic_auth_string = remote_connection._separate_http_proxy_auth()
76
76
assert proxy_url == "http://user:password@http_proxy.com:8080"
77
77
assert raw_proxy_url == "http://http_proxy.com:8080"
78
78
assert basic_auth_string == "user:password"
@@ -81,7 +81,7 @@ def test_get_proxy_url_http_auth(mock_proxy_auth_settings):
81
81
def test_get_proxy_url_https_auth(mock_proxy_auth_settings):
82
82
remote_connection = RemoteConnection('https://remote', keep_alive=False)
83
83
proxy_url = remote_connection._get_proxy_url()
84
-
raw_proxy_url, basic_auth_string = remote_connection._seperate_http_proxy_auth()
84
+
raw_proxy_url, basic_auth_string = remote_connection._separate_http_proxy_auth()
85
85
assert proxy_url == "https://user:password@https_proxy.com:8080"
86
86
assert raw_proxy_url == "https://https_proxy.com:8080"
87
87
assert basic_auth_string == "user:password"
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4