~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2004.3.3.

Better (but still incomplete) design for bogus servers.

* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractHTTPHandler): Add 'Accept: */*' again to default headers
until I fully understand why and when it's needed or not (curl add
it if no Accept header is present).

* bzrlib/transport/http/_pycurl.py:
(PyCurlTransport._curl_perform): CURLE_GOT_NOTHING may be
considered as a ConnectionError, inspection of curl code reveals
that the case is sufficiently rare and low level related to not be
considered an http error per se.

* bzrlib/transport/http/__init__.py:
(WallHttpServer): Deleted.

* bzrlib/tests/test_http.py:
(TestBogusServer): Factor out the tests common to the bogus
servers.

* bzrlib/tests/__init__.py:
(TestCaseWithTransport.create_transport_server,
TestCaseWithTransport.create_transport_readonly_server): New
methods, allows test cases to specify the transport servers
without defining useless classes.
(TestCaseWithTransport.get_readonly_server): Use
create_transport_readonly_server.
(TestCaseWithTransport.get_server): Use create_transport_server.

* bzrlib/tests/HTTPTestUtil.py:
(TestCaseWithWebserver): Fix typo in doc string.
(TestCaseWithWallserver): Deleted.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: