~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-13 05:52:27 UTC
  • mfrom: (2180.1.2 revert-missing)
  • Revision ID: pqm@pqm.ubuntu.com-20061213055227-6159e82aef3f15a6
Handle short http reads better.  (Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
        return data
280
280
    elif code == 404:
281
281
        raise errors.NoSuchFile(url)
 
282
    elif code == 416:
 
283
        # We don't know which, but one of the ranges we specified
 
284
        # was wrong. So we raise with 0 for a lack of a better
 
285
        # magic value.
 
286
        raise errors.InvalidRange(url,0)
282
287
 
283
288
    # TODO: jam 20060713 Properly handle redirects (302 Found, etc)
284
289
    #       The '_get' code says to follow redirects, we probably