File tree Expand file tree Collapse file tree
src/databricks/sql/backend Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99from uuid import UUID
1010
1111from databricks .sql .common .unified_http_client import UnifiedHttpClient
12+ from databricks .sql .common .url_utils import normalize_host_with_protocol
1213from databricks .sql .result_set import ThriftResultSet
1314from databricks .sql .telemetry .models .event import StatementType
1415
@@ -156,10 +157,10 @@ def __init__(
156157 uri = kwargs .get ("_connection_uri" )
157158 elif server_hostname and http_path :
158159 uri = "{host}:{port}/{path}" .format (
159- host = server_hostname .rstrip ("/" ), port = port , path = http_path .lstrip ("/" )
160+ host = normalize_host_with_protocol (server_hostname ),
161+ port = port ,
162+ path = http_path .lstrip ("/" ),
160163 )
161- if not uri .lower ().startswith ("https://" ):
162- uri = "https://" + uri
163164 else :
164165 raise ValueError ("No valid connection settings." )
165166
You can’t perform that action at this time.
0 commit comments