We do the following:
CONNECT to tunnel through the proxy
SSL after that, so wireshark isn't all that helpful.
In the failing method I see:
(Pdb) print proxy._ServerProxy__host
xmlrpc.edge.launchpad.net
(Pdb) proxy._ServerProxy__transport._opener
<bzrlib.transport.http._urllib2_wrappers.Opener object at 0x1e781d0>
Deep in urllib2, in do_request, line 1080, request.has_proxy is False - this is interesting and seems to be due to the urllib2 set_proxy methods behaviour. I'll need to stare harder at this to understand it I think.
and online 1084 is where the wrong Host header is set.
Now, Its my first time looking at this code, but I think the simplest thing up front is to set Host ourselves. The backtrace is:
/home/robertc/source/baz/pending/working/bzrlib/plugins/launchpad/lp_registration.py(74)request()
-> response = self._opener.open(request)
/usr/lib/python2.6/urllib2.py(389)open()
-> req = meth(req)
> /usr/lib/python2.6/urllib2.py(1084)do_request_()
-> if not request.has_header('Host'):
(Pdb)
More later, a quick attempt at that hasn't worked.
We do the following:
CONNECT to tunnel through the proxy
SSL after that, so wireshark isn't all that helpful.
In the failing method I see: ServerProxy_ _host edge.launchpad. net ServerProxy_ _transport. _opener transport. http._urllib2_ wrappers. Opener object at 0x1e781d0>
(Pdb) print proxy._
xmlrpc.
(Pdb) proxy._
<bzrlib.
Deep in urllib2, in do_request, line 1080, request.has_proxy is False - this is interesting and seems to be due to the urllib2 set_proxy methods behaviour. I'll need to stare harder at this to understand it I think.
and online 1084 is where the wrong Host header is set.
Now, Its my first time looking at this code, but I think the simplest thing up front is to set Host ourselves. The backtrace is: robertc/ source/ baz/pending/ working/ bzrlib/ plugins/ launchpad/ lp_registration .py(74) request( ) open(request) lib/python2. 6/urllib2. py(389) open() python2. 6/urllib2. py(1084) do_request_ () has_header( 'Host') :
/home/
-> response = self._opener.
/usr/
-> req = meth(req)
> /usr/lib/
-> if not request.
(Pdb)
More later, a quick attempt at that hasn't worked.