Skip to content

Commit a445200

Browse files
author
Jesse Whitehouse
committed
Set custom cookies received from the server
Signed-off-by: Jesse Whitehouse <[email protected]>
1 parent 4e2d667 commit a445200

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/databricks/sql/auth/thrift_http_client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ def flush(self):
167167
# Get reply to flush the request
168168
self.code = self.__resp.status
169169
self.message = self.__resp.reason
170-
self.headers = self.__resp.msg
170+
self.headers = self.__resp.headers
171+
172+
# Saves the cookie sent by the server response
173+
if "Set-Cookie" in self.headers:
174+
self.setCustomHeaders(dict("Cookie", self.headers["Set-Cookie"]))
171175

172176
@staticmethod
173177
def basic_proxy_auth_header(proxy):

0 commit comments

Comments
 (0)