Disabled unnecessary and expensive headers validation and normalization
This commit is contained in:
parent
0940471928
commit
d2ff0029ab
|
@ -587,8 +587,14 @@ class Channel:
|
|||
self._codec = codec
|
||||
self._status_details_codec = status_details_codec
|
||||
|
||||
self._config = H2Configuration(client_side=True,
|
||||
header_encoding='ascii')
|
||||
self._config = H2Configuration(
|
||||
client_side=True,
|
||||
header_encoding='ascii',
|
||||
validate_inbound_headers=False,
|
||||
validate_outbound_headers=False,
|
||||
normalize_inbound_headers=False,
|
||||
normalize_outbound_headers=False,
|
||||
)
|
||||
self._authority = '{}:{}'.format(self._host, self._port)
|
||||
|
||||
if ssl is True:
|
||||
|
|
|
@ -582,6 +582,10 @@ class Server(_GC, asyncio.AbstractServer):
|
|||
self._config = h2.config.H2Configuration(
|
||||
client_side=False,
|
||||
header_encoding='ascii',
|
||||
validate_inbound_headers=False,
|
||||
validate_outbound_headers=False,
|
||||
normalize_inbound_headers=False,
|
||||
normalize_outbound_headers=False,
|
||||
)
|
||||
|
||||
self._server: Optional[asyncio.AbstractServer] = None
|
||||
|
|
Loading…
Reference in New Issue