Skip to content

Commit 3fcd6b9

Browse files
fix lint
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent 7e30d28 commit 3fcd6b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/databricks/sql/common/unified_http_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,14 @@ def _setup_pool_managers(self):
118118
# We use 'https' as default scheme since most requests will be HTTPS
119119
parsed_url = urllib.parse.urlparse(self.config.hostname)
120120
self.scheme = parsed_url.scheme or "https"
121+
self.host = parsed_url.hostname
121122

122123
# Check if system has proxy configured for our scheme
123124
try:
124125
# Use shared proxy detection logic, skipping bypass since we handle that per-request
125126
proxy_url, proxy_auth = detect_and_parse_proxy(
126127
self.scheme,
128+
self.host,
127129
skip_bypass=True,
128130
proxy_auth_method=self.config.proxy_auth_method,
129131
)
@@ -283,7 +285,7 @@ def request(
283285
"""
284286
with self.request_context(method, url, headers=headers, **kwargs) as response:
285287
# Read the response data to ensure it's available after context exit
286-
# Note: status and headers remain accessible after close(), only data needs caching
288+
# Note: status and headers remain accessible after close(); calling response.read() loads and caches the response data so it remains accessible after the response is closed.
287289
response.read()
288290
return response
289291

0 commit comments

Comments
 (0)