File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1414from io import BytesIO
1515
1616from urllib3 import HTTPConnectionPool , HTTPSConnectionPool , ProxyManager
17-
17+ from urllib3 . util import make_headers
1818from databricks .sql .auth .retry import CommandType , DatabricksRetryPolicy
1919
2020
@@ -120,7 +120,7 @@ def open(self):
120120 proxy_manager = ProxyManager (
121121 self .proxy_uri ,
122122 num_pools = 1 ,
123- headers = { "Proxy-Authorization" : self .proxy_auth } ,
123+ proxy_headers = self .proxy_auth ,
124124 )
125125 self .__pool = proxy_manager .connection_from_host (
126126 host = self .realhost ,
@@ -197,8 +197,7 @@ def basic_proxy_auth_header(proxy):
197197 urllib .parse .unquote (proxy .username ),
198198 urllib .parse .unquote (proxy .password ),
199199 )
200- cr = base64 .b64encode (ap .encode ()).strip ()
201- return "Basic " + six .ensure_str (cr )
200+ return make_headers (proxy_basic_auth = ap )
202201
203202 def set_retry_command_type (self , value : CommandType ):
204203 """Pass the provided CommandType to the retry policy"""
You can’t perform that action at this time.
0 commit comments