~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_pycurl.py

  • Committer: Vincent Ladeuil
  • Date: 2008-12-04 11:25:56 UTC
  • mto: (3902.1.1 bzr.integration)
  • mto: This revision was merged to the branch mainline in revision 3903.
  • Revision ID: v.ladeuil+lp@free.fr-20081204112556-g3i9tf396wygm1b7
Fix bug #265070 by providing a finer sieve for accepted redirections.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Provides the implementation name.

* bzrlib/transport/http/_pycurl.py:
(PyCurlTransport.__init__): Provides the implementation name.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase.__init__): Make the implementation a mandatory
parameter.
(HttpTransportBase._redirected_to.relpath): We need a dedicated
relpath method to be able to cope with slight differences between
the url sent and the url received from the server.
(HttpTransportBase._redirected_to): Fix bug #265070 by accepting
more redirection kinds and handling them: http <-> https and user
specified in the url.

* bzrlib/tests/test_http.py:
(Test_redirected_to): More complete tests for _redirected_to().

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
 
107
107
    def __init__(self, base, _from_transport=None):
108
108
        super(PyCurlTransport, self).__init__(base,
109
 
                                              _from_transport=_from_transport)
110
 
        if base.startswith('https'):
 
109
                                              _from_transport=_from_transport,
 
110
                                              _impl_name='pycurl')
 
111
        if self._unqualified_scheme == 'https':
111
112
            # Check availability of https into pycurl supported
112
113
            # protocols
113
114
            supported = pycurl.version_info()[8]