QUERY has the highest llhttp method id; both parsers must decode its name. Regression test for a stale hand-maintained method count in the C parser that mapped the last method(s) to " ".
(parser: HttpRequestParser)
| 749 | |
| 750 | |
| 751 | def test_parse_query_method(parser: HttpRequestParser) -> None: |
| 752 | """QUERY has the highest llhttp method id; both parsers must decode its name. |
| 753 | |
| 754 | Regression test for a stale hand-maintained method count in the C parser |
| 755 | that mapped the last method(s) to "<unknown>". |
| 756 | """ |
| 757 | text = b"QUERY /test HTTP/1.1\r\nHost: a\r\n\r\n" |
| 758 | messages, upgrade, tail = parser.feed_data(text) |
| 759 | assert len(messages) == 1 |
| 760 | msg = messages[0][0] |
| 761 | assert msg.method == "QUERY" |
| 762 | assert msg.path == "/test" |
| 763 | assert msg.version == (1, 1) |
| 764 | |
| 765 | |
| 766 | async def test_parse_body(parser: HttpRequestParser) -> None: |