/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2007-07-04 12:28:56 UTC
  • mfrom: (2584 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070704122856-7jn5e6ou08ukimof
merge bzr.dev @ 2584 resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        else:
144
144
            self._raise_curl_http_error(curl)
145
145
 
146
 
    def _get(self, relpath, ranges, tail_amount=0):
 
146
    def _get(self, relpath, offsets, tail_amount=0):
147
147
        # This just switches based on the type of request
148
 
        if ranges is not None or tail_amount not in (0, None):
149
 
            return self._get_ranged(relpath, ranges, tail_amount=tail_amount)
 
148
        if offsets is not None or tail_amount not in (0, None):
 
149
            return self._get_ranged(relpath, offsets, tail_amount=tail_amount)
150
150
        else:
151
151
            return self._get_full(relpath)
152
152
 
196
196
 
197
197
        return code, data
198
198
 
199
 
    def _get_ranged(self, relpath, ranges, tail_amount):
 
199
    def _get_ranged(self, relpath, offsets, tail_amount):
200
200
        """Make a request for just part of the file."""
201
201
        curl = self._get_curl()
202
202
        abspath, data, header = self._setup_get_request(curl, relpath)
203
203
 
204
 
        range_header = self.attempted_range_header(ranges, tail_amount)
 
204
        range_header = self._attempted_range_header(offsets, tail_amount)
205
205
        if range_header is None:
206
206
            # Forget ranges, the server can't handle them
207
207
            return self._get_full(relpath)