/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 breezy/transport/http/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1201
1201
        if not server_headers:
1202
1202
            # The http error MUST have the associated
1203
1203
            # header. This must never happen in production code.
1204
 
            raise KeyError('%s not found' % self.auth_required_header)
 
1204
            trace.mutter('%s not found', self.auth_required_header)
 
1205
            return None
1205
1206
 
1206
1207
        auth = self.get_auth(request)
1207
1208
        auth['modified'] = False
1700
1701
                       403,
1701
1702
                       404,  # Not found
1702
1703
                       405,  # Method not allowed
 
1704
                       406,  # Not Acceptable
1703
1705
                       409,  # Conflict
1704
1706
                       416,  # Range not satisfiable
1705
1707
                       422,  # Unprocessible entity
1731
1733
                'Server refuses to fulfill the request (403 Forbidden)'
1732
1734
                ' for %s' % req.get_full_url())
1733
1735
        else:
1734
 
            raise errors.InvalidHttpResponse(req.get_full_url(),
1735
 
                                             'Unable to handle http code %d: %s'
1736
 
                                             % (code, msg))
 
1736
            raise errors.UnexpectedHttpStatus(
 
1737
                req.get_full_url(), code,
 
1738
                'Unable to handle http code: %s' % msg)
1737
1739
 
1738
1740
 
1739
1741
class Opener(object):