~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2007-05-06 06:59:57 UTC
  • mto: (2495.1.1 bzr.ab.integration)
  • mto: This revision was merged to the branch mainline in revision 2496.
  • Revision ID: v.ladeuil+lp@free.fr-20070506065957-4jdlek9i5at2qb36
Fix bug #112719 by using the right range header.

* HTTPTestUtil.py:
(SingleOnlyRangeRequestHandler): Noisily refuses mutliple range
requests.

* test_http.py:
(TestSingleOnlyRangeRequestServer): Test the retry mechanism when
a server refuses to handle a mutiple range request without
silently replying with a single range or full file response.

* _pycurl.py:
(PyCurlTransport._get_ranged): The header have been built taken
into account the range hint, don't rebuilt it *ignoring* that
hint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
            # Forget ranges, the server can't handle them
200
200
            return self._get_full(relpath)
201
201
 
202
 
        self._curl_perform(curl, header,
203
 
                           ['Range: bytes=%s'
204
 
                            % self.range_header(ranges, tail_amount)])
 
202
        self._curl_perform(curl, header, ['Range: bytes=%s' % range_header])
205
203
        data.seek(0)
206
204
 
207
205
        code = curl.getinfo(pycurl.HTTP_CODE)