(
context: Context,
event: ResponseHeaders,
)
| 388 | |
| 389 | |
| 390 | def format_h2_response_headers( |
| 391 | context: Context, |
| 392 | event: ResponseHeaders, |
| 393 | ) -> CommandGenerator[list[tuple[bytes, bytes]]]: |
| 394 | headers = [ |
| 395 | (b":status", b"%d" % event.response.status_code), |
| 396 | *event.response.headers.fields, |
| 397 | ] |
| 398 | if event.response.is_http2 or event.response.is_http3: |
| 399 | if context.options.normalize_outbound_headers: |
| 400 | yield from normalize_h2_headers(headers) |
| 401 | else: |
| 402 | headers = normalize_h1_headers(headers, False) |
| 403 | return headers |
| 404 | |
| 405 | |
| 406 | class Http2Server(Http2Connection): |
no test coverage detected
searching dependent graphs…