File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 14
14
from io import BytesIO
15
15
16
16
from urllib3 import HTTPConnectionPool , HTTPSConnectionPool , ProxyManager
17
-
17
+ from urllib3 . util import make_headers
18
18
from databricks .sql .auth .retry import CommandType , DatabricksRetryPolicy
19
19
20
20
@@ -120,7 +120,7 @@ def open(self):
120
120
proxy_manager = ProxyManager (
121
121
self .proxy_uri ,
122
122
num_pools = 1 ,
123
- headers = { "Proxy-Authorization" : self .proxy_auth } ,
123
+ proxy_headers = self .proxy_auth ,
124
124
)
125
125
self .__pool = proxy_manager .connection_from_host (
126
126
host = self .realhost ,
@@ -197,8 +197,7 @@ def basic_proxy_auth_header(proxy):
197
197
urllib .parse .unquote (proxy .username ),
198
198
urllib .parse .unquote (proxy .password ),
199
199
)
200
- cr = base64 .b64encode (ap .encode ()).strip ()
201
- return "Basic " + six .ensure_str (cr )
200
+ return make_headers (proxy_basic_auth = ap )
202
201
203
202
def set_retry_command_type (self , value : CommandType ):
204
203
"""Pass the provided CommandType to the retry policy"""
You can’t perform that action at this time.
0 commit comments