I'm trying to connect to a website with python framework. But I need to connect on a server, which will give a cookie, that I will use on another.
I can log in, the response is correct (I can see it in Debug mode) but I don't manage to get the cookie in received http dictionnary, because it seems to be able to contain only one "Set-Cookie", and http can send many, so it is overwritten. Am I right? Shouldn't headers be a List or a Set?
Code: Select all
2018-04-05 23:08:56.693 (Linky) HTTP Details (2):
2018-04-05 23:08:56.693 (Linky) --->'Status':'302'
2018-04-05 23:08:56.693 (Linky) --->'Headers (12):
2018-04-05 23:08:56.693 (Linky) ------->'Date':'Thu, 05 Apr 2018 21:08:56 GMT'
2018-04-05 23:08:56.693 (Linky) ------->'Server':'Apache'
2018-04-05 23:08:56.693 (Linky) ------->'Set-Cookie':'AMAuthCookie=LOGOUT; Domain=.enedis.fr; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/'
2018-04-05 23:08:56.693 (Linky) ------->'Cache-Control':'private'
2018-04-05 23:08:56.693 (Linky) ------->'Pragma':'no-cache'
2018-04-05 23:08:56.693 (Linky) ------->'AM_CLIENT_TYPE':'genericHTML'
2018-04-05 23:08:56.693 (Linky) ------->'X-AuthErrorCode':'0'
2018-04-05 23:08:56.693 (Linky) ------->'Location':'https://espace-client-particuliers.erdf.fr'
2018-04-05 23:08:56.693 (Linky) ------->'Content-Length':'0'
2018-04-05 23:08:56.694 (Linky) ------->'Keep-Alive':'timeout=5, max=300'
2018-04-05 23:08:56.694 (Linky) ------->'Connection':'Keep-Alive'
2018-04-05 23:08:56.694 (Linky) ------->'Content-Type':'text/plain'