(tctx: context.Context)
| 404 | |
| 405 | |
| 406 | def test_invalid_header(tctx: context.Context): |
| 407 | playbook, cff = start_h3_proxy(tctx) |
| 408 | assert ( |
| 409 | playbook |
| 410 | >> cff.receive_headers( |
| 411 | [ |
| 412 | (b":method", b"CONNECT"), |
| 413 | (b":path", b"/"), |
| 414 | (b":authority", b"example.com"), |
| 415 | ], |
| 416 | end_stream=True, |
| 417 | ) |
| 418 | << cff.send_decoder() # for receive_headers |
| 419 | << quic.CloseQuicConnection( |
| 420 | tctx.client, |
| 421 | error_code=ErrorCode.H3_GENERAL_PROTOCOL_ERROR.value, |
| 422 | frame_type=None, |
| 423 | reason_phrase="Invalid HTTP/3 request headers: Required pseudo header is missing: b':scheme'", |
| 424 | ) |
| 425 | # ensure that once we close, we don't process messages anymore |
| 426 | >> cff.receive_headers( |
| 427 | [ |
| 428 | (b":method", b"CONNECT"), |
| 429 | (b":path", b"/"), |
| 430 | (b":authority", b"example.com"), |
| 431 | ], |
| 432 | end_stream=True, |
| 433 | ) |
| 434 | ) |
| 435 | |
| 436 | |
| 437 | def test_simple(tctx: context.Context): |
nothing calls this directly
no test coverage detected
searching dependent graphs…