~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-01 06:48:38 UTC
  • mfrom: (2389.1.1 0.15-to-trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20070401064838-34903c7b0d0c8007
merge 0.15 back to dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
            self._query, self._fragment) = urlparse.urlparse(self.base)
144
144
        self._qualified_proto = apparent_proto
145
145
        # range hint is handled dynamically throughout the life
146
 
        # of the object. We start by trying mulri-range requests
 
146
        # of the object. We start by trying multi-range requests
147
147
        # and if the server returns bougs results, we retry with
148
148
        # single range requests and, finally, we forget about
149
149
        # range if the server really can't understand. Once
226
226
        code, response_file = self._get(relpath, None)
227
227
        return response_file
228
228
 
229
 
    def _get(self, relpath, ranges):
 
229
    def _get(self, relpath, ranges, tail_amount=0):
230
230
        """Get a file, or part of a file.
231
231
 
232
232
        :param relpath: Path relative to transport base URL
233
 
        :param byte_range: None to get the whole file;
234
 
            or [(start,end)] to fetch parts of a file.
 
233
        :param ranges: None to get the whole file;
 
234
            or [(start,end)+], a list of tuples to fetch parts of a file.
 
235
        :param tail_amount: The amount to get from the end of the file.
235
236
 
236
237
        :returns: (http_code, result_file)
237
 
 
238
 
        Note that the current http implementations can only fetch one range at
239
 
        a time through this call.
240
238
        """
241
239
        raise NotImplementedError(self._get)
242
240