~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2007-03-01 21:26:57 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-20070301212657-bclmihdfnxgfy0sw
Take Aaron's review comments into account.

* bzrlib/transport/http/_urllib2_wrappers.py:
(HTTPRedirectHandler.http_error_301): Fix bug #88780.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase._get): Fix doc string.

* bzrlib/transport/__init__.py:
(do_catching_redirections): Raise TooManyRedirections instead of
requiring an exception as a parameter.

* bzrlib/tests/test_http.py:
(TestHTTPRedirections.setUp): Simplified.
(TestHTTPRedirections.test_read_redirected_bundle_from_url): New test.
(TestDoCatchRedirections): New tests.

* bzrlib/tests/HTTPTestUtil.py:
(TestCaseWithRedirectedWebserver): New class factored out from
test_http.TestHTTPRedirections.

* bzrlib/errors.py:
(TooManyRedirections): New exception.

* bzrlib/bzrdir.py:
(BzrDir.open_from_transport.redirected): Catch TooManyRedirections.

* bzrlib/bundle/__init__.py:
(read_bundle_from_url.redirected_transport): Catch TooManyRedirections.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
        :param relpath: Path relative to transport base URL
233
233
        :param ranges: None to get the whole file;
234
234
            or [(start,end)+], a list of tuples to fetch parts of a file.
235
 
        :param tail_amount: to fetch that amount from file tail.
 
235
        :param tail_amount: to fetch the last bytes of the file.
236
236
 
237
237
        :returns: (http_code, result_file)
238
238