Comment 0 for bug 270517

Revision history for this message
Graham Binns (gmb) wrote :

Since we implemented the UrlLib2Transport for XML-RPC, Launchpad will fail when trying to authenticate with Bugzilla. This has been masked by bug 269538 whenever we've tried to actually do the authentication.

The problem arises because, in BugzillaLPPlugin._authenticate() there is this line:

 auth_cookies = self._extractAuthCookie(self.xmlrpc_transport.last_response_headers['Set-Cookie'])

This works fine in tests, since our TestBugzillaXMLRPCTransport has a last_response_headers attribute, as did the xmlrpclib.Transport subclass that we used to use, which UrlLib2Transport replaced. UrlLib2Transport doesn't offer last_response_headers, so this line of code consistently fails.

We need to add a nice abstraction for retrieving cookies from UrlLib2Transport and also fix this line of code (and the related TestBugzillaXMLRPCTransport code).

 affects malone
 milestone 2.1.9
 importance high
 status triaged
 assignee gmb