~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 3059.2.5.

  • Committer: Vincent Ladeuil
  • Date: 2007-12-03 13:52:36 UTC
  • mto: (2929.3.16 https) (3097.2.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3099.
  • Revision ID: v.ladeuil+lp@free.fr-20071203135236-eh1ia9y0aurc91gb
DAMN^64, the http test server is 1.0 not 1.1 :( Better pipe cleaning and less readv caching (since that's the point of the whole fix).

* bzrlib/transport/http/_urllib2_wrappers.py:
(Response.finish): Do the Right Thing to clean the pipe: most of
the time we know exactly how many bytes are still to be read. And
when we don't, we are not maintaining a persistent connection so
we don't care.
(AbstractHTTPConnection.__init__): Keep track of the last response
handled.
(AbstractHTTPConnection._mutter_connect): New method issuing the
traces.
(AbstractHTTPConnection.getresponse): Capture each response.
(AbstractHTTPConnection.cleanup_pipe): Delegate the cleaning to
the response, it knows better.
(HTTPConnection.__init__): Not the right place to reliably trace
the connections issued.
(HTTPConnection.connect, HTTPSConnection.connect): Right place to
reliably trace the connections issued.
(AbstractHTTPHandler.do_open): The debug output for response was
not done at the right place, resulting in trace doubling in case
of retry on errors.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase._readv): If the coalesced offsets order matches
the provided offsets order, don't cache. Ftw.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: