Skip to content

Commit 4682c1c

Browse files
Upgrade to llhttp 9.2 (#8146) (#8151)
(cherry picked from commit 0ec65c0)
1 parent eb397f3 commit 4682c1c

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

CHANGES/8146.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgraded *llhttp* to 9.2 -- by :user:`Dreamsorcerer`.

tests/test_http_parser.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -623,25 +623,9 @@ def test_headers_content_length_err_2(parser) -> None:
623623
}
624624

625625

626-
@pytest.fixture
627-
def xfail_c_parser_empty_header(request) -> None:
628-
if not all(
629-
(request.getfixturevalue(name) == b"") for name in ("pad1", "pad2", "hdr")
630-
):
631-
return
632-
if isinstance(request.getfixturevalue("parser"), HttpRequestParserPy):
633-
return
634-
request.node.add_marker(
635-
pytest.mark.xfail(
636-
reason="Regression test for Py parser. May match C behaviour later.",
637-
)
638-
)
639-
640-
641626
@pytest.mark.parametrize("hdr", [b"", b"foo"], ids=["name-empty", "with-name"])
642627
@pytest.mark.parametrize("pad2", _pad.keys(), ids=["post-" + n for n in _pad.values()])
643628
@pytest.mark.parametrize("pad1", _pad.keys(), ids=["pre-" + n for n in _pad.values()])
644-
@pytest.mark.usefixtures("xfail_c_parser_empty_header")
645629
def test_invalid_header_spacing(parser, pad1: bytes, pad2: bytes, hdr: bytes) -> None:
646630
text = b"GET /test HTTP/1.1\r\n" b"%s%s%s: value\r\n\r\n" % (pad1, hdr, pad2)
647631
expectation = pytest.raises(http_exceptions.BadHttpMessage)
@@ -653,8 +637,6 @@ def test_invalid_header_spacing(parser, pad1: bytes, pad2: bytes, hdr: bytes) ->
653637

654638

655639
def test_empty_header_name(parser) -> None:
656-
if not isinstance(parser, HttpRequestParserPy):
657-
pytest.xfail("Regression test for Py parser. May match C behaviour later.")
658640
text = b"GET /test HTTP/1.1\r\n" b":test\r\n\r\n"
659641
with pytest.raises(http_exceptions.BadHttpMessage):
660642
parser.feed_data(text)

0 commit comments

Comments
 (0)