launchpad proxy support
gordon at doxxx.net
Fri Oct 30 17:27:34 GMT 2009
Vincent Ladeuil wrote:
> Can you attach the relevant part of you .bzr.log ? Watch for
> authentication info and anonymize as you see fit.
0.219 * About to connect() to localhost:3128(proxy for
0.234 > CONNECT xmlrpc.edge.launchpad.net
0.250 < HTTP/1.1 502 Proxy Error ( The parameter is incorrect. )
CNTLM is running on my local machine using port 3128. It's configured
with my domain username and password for our corporate network and it
works perfectly for my web browser and other applications accessing
Here is what I see in CNTLM's log output for the above:
HEAD: CONNECT xmlrpc.edge.launchpad.net HTTP/1.1
And this is what I see when loading "https://lauchpad.net/" in my web
browser through CNTLM:
HEAD: CONNECT launchpad.net:443 HTTP/1.1
Notice that the browser explicitly uses port 443 in its CONNECT request
for the https URL.
> Gordon> e.g. CONNECT xmlrpc.edge.launchpad.net
> Gordon> This means that the proxy connects to port 80, gives
> Gordon> this connection back and then the _urllib2_wrappers
> Gordon> code tries to talk SSL to it and fails.
> Soubds like a proxy bug to me....but let's see what we can do.
I've tried two different proxies with the same or similar result. I
doubt that they both have exactly the same bug.
How is the proxy supposed to know what port to connect to if you don't
> Gordon> My fix in _urllib2_wrappers was make Request and
> Gordon> _ConnectRequest remember what the original port
> Gordon> number in the URL was (using the scheme's default if
> Gordon> not specified in the URL) and then use this
> Gordon> explicitly in the CONNECT request.
> We don't need to keep it, we know what it should be.
I was working under the assumption that the _urllib_wrappers stuff is
supposed to be generic. It can't assume what port to use unless none is
specified in the original URL.
More information about the bazaar