From 01fd2a82f62802f290bb88ffea193cc13ae27758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Wed, 12 Nov 2014 18:04:23 +0100 Subject: [PATCH] Revert "http: remove old useless hack for biblio which is useless now" This reverts commit ddc7a55a00c30263da55da7aa14b3374a2957750. --- mandaye/http.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mandaye/http.py b/mandaye/http.py index aca0871..d2855dd 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: + cookie = Cookie.SimpleCookie("Set-Cookie: %s" % setcookie) + cookie = cookie.values()[0] + if self.cookies.has_key(cookie.key): + del self.cookies[cookie.key] self.cookies.load("Set-Cookie: %s" % setcookie) except Cookie.CookieError: logger.warning("can't parse cookie: %r", setcookie)