THRIFT-5165: THttpClient saves session cookie.
Client: py
Patch: Joao Antonio
This closes #2086
diff --git a/lib/py/src/transport/THttpClient.py b/lib/py/src/transport/THttpClient.py
index 37b0a4d..212da3a 100644
--- a/lib/py/src/transport/THttpClient.py
+++ b/lib/py/src/transport/THttpClient.py
@@ -185,3 +185,7 @@
self.code = self.__http_response.status
self.message = self.__http_response.reason
self.headers = self.__http_response.msg
+
+ # Saves the cookie sent by the server response
+ if 'Set-Cookie' in self.headers:
+ self.__http.putheader('Cookie', self.headers['Set-Cookie'])