~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

merge bzr.dev@3903

Show diffs side-by-side

added added

removed removed

Lines of Context:
1249
1249
        # should be asked to ConnectedTransport only.
1250
1250
        return None
1251
1251
 
 
1252
    def _redirected_to(self, source, target):
 
1253
        """Returns a transport suitable to re-issue a redirected request.
 
1254
 
 
1255
        :param source: The source url as returned by the server.
 
1256
        :param target: The target url as returned by the server.
 
1257
 
 
1258
        The redirection can be handled only if the relpath involved is not
 
1259
        renamed by the redirection.
 
1260
 
 
1261
        :returns: A transport or None.
 
1262
        """
 
1263
        # This returns None by default, meaning the transport can't handle the
 
1264
        # redirection.
 
1265
        return None
 
1266
 
 
1267
 
1252
1268
 
1253
1269
class _SharedConnection(object):
1254
1270
    """A connection shared between several transports."""
1739
1755
                 help="Read-only access of branches exported on the web.")
1740
1756
register_transport_proto('https://',
1741
1757
            help="Read-only access of branches exported on the web using SSL.")
 
1758
# The default http implementation is urllib, but https is pycurl if available
 
1759
register_lazy_transport('http://', 'bzrlib.transport.http._pycurl',
 
1760
                        'PyCurlTransport')
1742
1761
register_lazy_transport('http://', 'bzrlib.transport.http._urllib',
1743
1762
                        'HttpTransport_urllib')
1744
1763
register_lazy_transport('https://', 'bzrlib.transport.http._urllib',
1745
1764
                        'HttpTransport_urllib')
1746
 
register_lazy_transport('http://', 'bzrlib.transport.http._pycurl',
1747
 
                        'PyCurlTransport')
1748
1765
register_lazy_transport('https://', 'bzrlib.transport.http._pycurl',
1749
1766
                        'PyCurlTransport')
1750
1767