~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-07-06 16:29:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1869.
  • Revision ID: john@arbash-meinel.com-20060706162912-1680b115cdb24071
[merge] Johan Rydberg test updates

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
        else:
161
161
            self._raise_curl_http_error(curl)
162
162
        
163
 
    def _get(self, relpath, ranges):
 
163
    def _get(self, relpath, ranges, tail_amount=0):
164
164
        # Documentation says 'Pass in NULL to disable the use of ranges'
165
165
        # None is the closest we have, but at least with pycurl 7.13.1
166
166
        # It raises an 'invalid arguments' response
178
178
 
179
179
        response = CurlResponse(curl)
180
180
 
181
 
        if ranges is not None:
182
 
            curl.setopt(pycurl.RANGE, self._range_header(ranges))
 
181
        if ranges is not None or tail_amount:
 
182
            curl.setopt(pycurl.RANGE, self._range_header(ranges, tail_amount))
183
183
        self._curl_perform(curl)
184
184
        response.update()
185
185
        if response.code == 0: