Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/databricks/sql/auth/thrift_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from io import BytesIO

from urllib3 import HTTPConnectionPool, HTTPSConnectionPool, ProxyManager

from urllib3.util import make_headers
from databricks.sql.auth.retry import CommandType, DatabricksRetryPolicy


Expand Down Expand Up @@ -120,7 +120,7 @@ def open(self):
proxy_manager = ProxyManager(
self.proxy_uri,
num_pools=1,
headers={"Proxy-Authorization": self.proxy_auth},
proxy_headers=self.proxy_auth,
)
self.__pool = proxy_manager.connection_from_host(
host=self.realhost,
Expand Down Expand Up @@ -201,8 +201,7 @@ def basic_proxy_auth_header(proxy):
urllib.parse.unquote(proxy.username),
urllib.parse.unquote(proxy.password),
)
cr = base64.b64encode(ap.encode()).strip()
return "Basic " + six.ensure_str(cr)
return make_headers(proxy_basic_auth=ap)

def set_retry_command_type(self, value: CommandType):
"""Pass the provided CommandType to the retry policy"""
Expand Down