~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2164.2.16.

  • Committer: Vincent Ladeuil
  • Date: 2007-02-12 14:02:01 UTC
  • mto: (2323.7.1 redirection)
  • mto: This revision was merged to the branch mainline in revision 2390.
  • Revision ID: v.ladeuil+lp@free.fr-20070212140201-khf5tnm6skh2ic0k
Add tests.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.has): Ignores 302 error code, it is already
handled.

* bzrlib/transport/http/_pycurl.py:
(PyCurlTransport.has): Set headers acquisition. Pass headers to
_curl_perform. Ignores 302 error code, it is already
handled.
(PyCurlTransport._get_full, PyCurlTransport._get_ranged): Pass
headers to _curl_perform.
(PyCurlTransport._post): Pass headers to _curl_perform.
(PyCurlTransport._set_curl_options): Do not follow redirections
anymore.
(PyCurlTransport._curl_perform): Handle redirections by raising

* bzrlib/tests/test_http.py:
(TestHTTPRedirections): Simplified.
(TestHTTPRedirections_pycurl): New class.

* bzrlib/tests/test_bzrdir.py:
(TestHTTPRedirectionLoop, TestHTTPRedirections_urllib,
TestHTTPRedirections_pycurl): New classes to test redirection
loops when opening bzrdirs.

* bzrlib/tests/HTTPTestUtil.py:
(HTTPServerRedirecting.redirect_to,
HTTPServerRedirecting.redirected_to_address): New methods.

* bzrlib/bzrdir.py:
(BzrDirMetaFormat1.probe_transport): Deleted.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: