Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr/186920-lp-proxy into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> Thanks to Gordon Tyler for starting a proof-of-concept implementation, I've finally
> been able to fix bug #186920 et all (the one about lp URLS that can't be
> resolved behind proxies).
>
> This patch implement an XMLRPC transport class using our _urllib2_wrappers (the fundations
> for the urllib http client), that gives us proxy support for free.
>
> I still haven't implemented a true proxy test server but I've added tests that exercise
> the full urllib http stack.
>
^- Shouldn't we have our own name here? We *can* re-use the existing
name, but it is potentially confusing.
Especially given that we have a "Transport" hierarchy already (and not
to mention that so does Paramiko), I'd like to at least call it
"XMLRPCTransport".
Also, it seems that Gordon responded that there was a problem with not
passing the original port to the proxy? Did you fix that in this? Or did
his comment come after the merge proposal?
I assume that the http/https trick is this line:
+ self._opener = _urllib2_wrappers.Opener()
(Opener supposedly creates the right instance of HTTP or HTTPS based on
the url/the url of the proxy?) I assume that is why you don't need:
- - if uri_type == 'https':
- - transport = xmlrpclib.SafeTransport()
- - else:
- - transport = xmlrpclib.Transport()
+ transport = Transport(uri_type)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr/186920-lp-proxy into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> Thanks to Gordon Tyler for starting a proof-of-concept implementation, I've finally
> been able to fix bug #186920 et all (the one about lp URLS that can't be
> resolved behind proxies).
>
> This patch implement an XMLRPC transport class using our _urllib2_wrappers (the fundations
> for the urllib http client), that gives us proxy support for free.
>
> I still haven't implemented a true proxy test server but I've added tests that exercise
> the full urllib http stack.
>
+class Transport( xmlrpclib. Transport) :
+
+ def __init__(self, scheme, use_datetime=0):
^- Shouldn't we have our own name here? We *can* re-use the existing
name, but it is potentially confusing.
Especially given that we have a "Transport" hierarchy already (and not
to mention that so does Paramiko), I'd like to at least call it
"XMLRPCTransport".
Also, it seems that Gordon responded that there was a problem with not
passing the original port to the proxy? Did you fix that in this? Or did
his comment come after the merge proposal?
I assume that the http/https trick is this line:
+ self._opener = _urllib2_ wrappers. Opener( )
(Opener supposedly creates the right instance of HTTP or HTTPS based on SafeTransport( ) Transport( )
the url/the url of the proxy?) I assume that is why you don't need:
- - if uri_type == 'https':
- - transport = xmlrpclib.
- - else:
- - transport = xmlrpclib.
+ transport = Transport(uri_type)
anymore.
+ write(tcs. canned_ response) Mixin(object) :
+ self.wfile.
+
+class PreCannedServer
^- bit of whitespace here
Otherwise:
review: approve
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
rGn4ACgkQJdeBCY SNAAN9SQCdFnI2k iY1Pykdz2xEMmQt YVBZ FltoF0851r217zJ iF
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkr
VZ0An3B1OXrswFO
=Vmrj
-----END PGP SIGNATURE-----