http: document the hack for vincennes biblio

This commit is contained in:
Jérôme Schneider 2014-11-12 18:34:25 +01:00
parent 01fd2a82f6
commit 47b3062a39
1 changed files with 4 additions and 0 deletions

View File

@ -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):