~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 3945.1.5.

  • Committer: Vincent Ladeuil
  • Date: 2009-01-29 14:27:28 UTC
  • mto: (3982.1.1 bzr.integration)
  • mto: This revision was merged to the branch mainline in revision 3983.
  • Revision ID: v.ladeuil+lp@free.fr-20090129142728-1iu8017zgso23w0i
Start implementing http activity reporting at socket level.

* bzrlib/transport/http/_urllib2_wrappers.py:
(_ReportingFileSocket, _ReportingSocket): Wrappers for
socket._socket and socket_filesocket objects providing activity
reporting.
(Response.__init__): Deleted. Wrapping the file socket object is
now done handled at connection time.
(AbstractHTTPConnection._wrap_socket_for_reporting): Wrap the
underlying socket into a reporting one.
(HTTPConnection.__init__, HTTPSConnection.__init__): Accept a
report_activity parameter.
(HTTPSConnection.connect): Wrap the newly created socket.
(HTTPSConnection.connect_to_origin): Wrap the newly created *or*
connected ssl socket.
(ConnectionHandler.__init__): Accept a report_activity parameter.
(ConnectionHandler.create_connection): Pass the report_activity
parameter to all created connections.
(Opener.__init__): Accept a report_activity parameter.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Provide the report activity
function to the opener.
(HttpTransport_urllib._get, HttpTransport_urllib._post): Don't use
the RangeFile report activity facility anymore.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase.get_bytes): Deleted, this gratuitously add a
useless level of buffering.

* bzrlib/tests/test_http.py:
(ActivityHttpServer, PreRecoredRequestHandler, TestActivity): Test
activity reporting by http clients.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: