~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_urllib2_wrappers.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:
655
655
                                                    hdrs, fp))
656
656
        elif code == 403:
657
657
            raise errors.TransportError('Server refuses to fullfil the request')
 
658
        elif code == 416:
 
659
            # We don't know which, but one of the ranges we
 
660
            # specified was wrong. So we raise with 0 for a lack
 
661
            # of a better magic value.
 
662
            raise errors.InvalidRange(req.get_full_url(),0)
658
663
        else:
659
664
            # TODO: A test is needed to exercise that code path
660
665
            raise errors.InvalidHttpResponse(req.get_full_url(),