src/pyams_utils/protocol/xmlrpc.py
changeset 38 60b0a6b21a12
parent 1 3f89629b9e54
child 55 d20591346980
--- a/src/pyams_utils/protocol/xmlrpc.py	Wed Jun 17 10:01:35 2015 +0200
+++ b/src/pyams_utils/protocol/xmlrpc.py	Wed Jul 15 11:20:55 2015 +0200
@@ -107,7 +107,10 @@
         if self.cookies is not None:
             crequest = XMLRPCCookieAuthTransport.CookieRequest('http://%s/' % host)
             cresponse = XMLRPCCookieAuthTransport.CookieResponse(response)
-            self.cookies.extract_cookies(cresponse, crequest)
+            for cookie in self.cookies.make_cookies(cresponse, crequest):
+                if cookie.name.startswith('Set-Cookie'):
+                    cookie.name = cookie.name.split(': ', 1)[1]
+                self.cookies.set_cookie(cookie)
         if response.status != 200:
             raise xmlrpc.client.ProtocolError(host + handler, response.status, response.reason, response.getheaders())
         return self.parse_response(response)