MCPcopy
hub / github.com/aio-libs/aiohttp / __init__

Method __init__

aiohttp/errors.py:147–151  ·  view source on GitHub ↗
(self, hdr)

Source from the content-addressed store, hash-verified

145class InvalidHeader(BadHttpMessage):
146
147 def __init__(self, hdr):
148 if isinstance(hdr, bytes):
149 hdr = hdr.decode('utf-8', 'surrogateescape')
150 super().__init__('Invalid HTTP Header: {}'.format(hdr))
151 self.hdr = hdr
152
153
154class BadStatusLine(BadHttpMessage):

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected