~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: 2007-07-03 07:35:46 UTC
  • mfrom: (2574.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070703073546-9dv8bocak8u3ou6m
(Vincent Ladeuil) Fix #115209 - Unable to handle http code 400: Bad Request When issuing too many ranges

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:
 
282
    # Some servers will retun "400: Bad Request" when too much ranges are
 
283
    # specified
 
284
    elif code in (400, 416):
283
285
        # We don't know which, but one of the ranges we specified
284
286
        # was wrong. So we raise with 0 for a lack of a better
285
287
        # magic value.