From 47b3062a39865719c4166f3a7b146bdc6f2d48d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Wed, 12 Nov 2014 18:34:25 +0100 Subject: [PATCH] http: document the hack for vincennes biblio --- mandaye/http.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mandaye/http.py b/mandaye/http.py index d2855dd..fd70920 100644 --- a/mandaye/http.py +++ b/mandaye/http.py @@ -154,6 +154,10 @@ class HTTPResponse(object): self.headers.load_httpmessage(response.headers) for setcookie in response.headers.getheaders('set-cookie'): try: + # WARNING hack for biblio.vincennes.fr + # during a basic login we have two set-coookie with the same key + # SimpleCookie will merge the 2 set-cookies by default + # this hack force to keep the second Set-cookie only cookie = Cookie.SimpleCookie("Set-Cookie: %s" % setcookie) cookie = cookie.values()[0] if self.cookies.has_key(cookie.key):