launchpad proxy support

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Oct 30 16:53:33 GMT 2009


>>>>> "Gordon" == Gordon Tyler <gordon at doxxx.net> writes:

    Gordon> Vincent Ladeuil wrote:
    >> I didn't touch the wrappers at all (well, except to take into
    >> account the report_activity problems you noticed).
    >> 
    >> Can you give a try at lp:~vila/bzr/186920-lp-proxy and give me
    >> feedback about whether it fixes the bug for you ?
    >> 
    >> I think the problems you encountered may be related to proxy
    >> redirecting http to https or the reverse, be sure to set
    >> https_proxy if you want to reach launchpad (or all_proxy) or
    >> simply because you tried to handle the default port explicitly,
    >> which we tried, failed, and abandoned in other areas :-)
    >> 
    >> I tested locally with tinyproxy on a jaunty host with:
    >> 
    >> https_proxy=http://localhost:8888 ./bzr lp-open -Dhttp lp:bzr

    Gordon> I tested using CNTLM and I get the following:

    Gordon> C:\dev\bzr>bzrdev -Dhttp lp-open lp:bzr
    Gordon> bzr: ERROR: Invalid http response for
    Gordon> https://xmlrpc.edge.launchpad.net/bazaar/: Unable to handle http
    Gordon> code 502: Proxy Error ( The parameter is incorrect.  )

Can you attach the relevant part of you .bzr.log ? Watch for
authentication info and anonymize as you see fit.

<snip/>

    Gordon> I discovered that the problem is that when
    Gordon> _urllib2_wrappers makes the CONNECT request to the
    Gordon> proxy it does not specify the port number.

Correct, and that seems to work quite well so far...

    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.

    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.

    Gordon> e.g. CONNECT xmlrpc.edge.launchpad.net:443

I'd like to better diagnose the problem before going that
route.

Thanks for your help !

        Vincent



More information about the bazaar mailing list