-
Committer:
Vincent Ladeuil
-
Date:
2008-01-02 14:13:55 UTC
-
mto:
(3159.1.1 trunk)
-
mto:
This revision was merged to the branch mainline in
revision
3161.
-
Revision ID:
v.ladeuil+lp@free.fr-20080102141355-k20yfjo6i1dasuny
Fix #179368 by keeping the current range hint on ShortReadvErrors.
* response.py:
(RangeFile._checked_read): Avoid huge buffering when huge seeks
are required.
* _urllib2_wrappers.py:
(Response.finish): Check for end-of-file or we'll loop if the
server lied about Content-Length.
* __init__.py:
(HttpTransportBase._readv): When a ShortReadvError occurs, try
again, staying in multiple range mode and degrades only if the
error occurs again for the same offset.
* test_http_response.py:
(TestRangeFileMultipleRanges): Add a test to exercise the buffer
overflow protection code.
* test_http.py:
(TestMultipleRangeWithoutContentLengthServer): Emulate lighttpd
behavior regarding bug #179368.