Skip to content

Commit

Permalink
THRIFT-5165: THttpClient saves session cookie.
Browse files Browse the repository at this point in the history
Client: py
Patch: Joao Antonio

This closes apache#2086
  • Loading branch information
joaopedroantonio authored and panivko committed May 29, 2020
1 parent 439284c commit ae4c641
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/py/src/transport/THttpClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,7 @@ def flush(self):
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'])

0 comments on commit ae4c641

Please sign in to comment.