[MERGE] Default to urllib for http connections
v.ladeuil+lp at free.fr
Tue Dec 9 07:49:20 GMT 2008
>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:
jam> This patch changes the default http provider from http+pycurl to
jam> The motivation is that in general, urllib provides better results. It
jam> can be interrupted, it removes a dependency on a 3rd-party library which
jam> seems to change in random and often incompatible ways, etc.
jam> The main reason we have kept pycurl around is because urllib doesn't
jam> verify the ssl certificate chain for https connections.
Work in progress but requiring python-2.6 so far (or adding a
dependency on the ssl module which is available for python 2.5
jam> However, that doesn't bring any benefit to http
That sounds reasonable.
Keep in mind though, that it has subtle consequences in case of
redirections, the http client implementation is changed when
redirecting from http to https and vice-versa which is not the
case without your patch.
I use a simple plugin:
| """Make urllib the default http implementation."""
| from bzrlib import transport
| transport.register_lazy_transport('http://', 'bzrlib.transport.http._urllib',
| transport.register_lazy_transport('https://', 'bzrlib.transport.http._urllib',
that defaults to urllib for both protocols, has the same
property, but still allows me to test pycurl support.
is merged, this will change and *preserve* the http client
implementation used for the initial location.
More information about the bazaar