Comment 2 for bug 380504

Revision history for this message
Leonard Richardson (leonardr) wrote : Re: HTTP Error 502: Bad Gateway

I need to see information about these 502 requests. Can you (either one of you, but preferably both) put this code in your Python before starting the Launchpad client?

httplib2.debuglevel = 1

Let's see the header and body dump of the HTTP request that caused the 502, and the 502 response itself. From what I can tell from Bryce's code he was trying to make a pretty standard GET to a bug.

In particular I want to see any Via headers, because the 502 response code is generally caused by the failure of an intermediary. OOPS headers would also be nice. The intermediary can't be Squid because web service requests all include an Authentication header. It might be Apache.

If the debuglevel thing isn't working, catch the HTTPError, print its .contents, and look at the headers in its .response object.