From 8ec68422948091ca754401b8c6e249a555156186 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Thu, 8 Feb 2024 18:42:00 +0000 Subject: [PATCH 1/4] Upgrade to llhttp 9.2 --- vendor/llhttp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/llhttp b/vendor/llhttp index 9ab2afc85b2..533845688d1 160000 --- a/vendor/llhttp +++ b/vendor/llhttp @@ -1 +1 @@ -Subproject commit 9ab2afc85b2880d96a94d38afaee301c6a314049 +Subproject commit 533845688d173561b9cba33269130401add38567 From 4f20e43fda9b34c0aa556e4823ad0255d79947e7 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Thu, 8 Feb 2024 18:45:19 +0000 Subject: [PATCH 2/4] Create 8146.feature.rst --- CHANGES/8146.feature.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGES/8146.feature.rst diff --git a/CHANGES/8146.feature.rst b/CHANGES/8146.feature.rst new file mode 100644 index 00000000000..866c3c9a159 --- /dev/null +++ b/CHANGES/8146.feature.rst @@ -0,0 +1 @@ +Upgraded llhttp to 9.2 -- by :user:`Dreamsorcerer`. From 09866c3e8fa153c7c069cedc07908ef7bce601f3 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Thu, 8 Feb 2024 19:10:11 +0000 Subject: [PATCH 3/4] Update 8146.feature.rst --- CHANGES/8146.feature.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES/8146.feature.rst b/CHANGES/8146.feature.rst index 866c3c9a159..9b0cc54206e 100644 --- a/CHANGES/8146.feature.rst +++ b/CHANGES/8146.feature.rst @@ -1 +1 @@ -Upgraded llhttp to 9.2 -- by :user:`Dreamsorcerer`. +Upgraded *llhttp* to 9.2 -- by :user:`Dreamsorcerer`. From b1e2b452d078b50189973786fe410cc64351bc18 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Thu, 8 Feb 2024 21:54:42 +0000 Subject: [PATCH 4/4] Update test_http_parser.py --- tests/test_http_parser.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/test_http_parser.py b/tests/test_http_parser.py index cd0b8b6ef76..e5214035280 100644 --- a/tests/test_http_parser.py +++ b/tests/test_http_parser.py @@ -622,25 +622,9 @@ def test_headers_content_length_err_2(parser: Any) -> None: } -@pytest.fixture -def xfail_c_parser_empty_header(request) -> None: - if not all( - (request.getfixturevalue(name) == b"") for name in ("pad1", "pad2", "hdr") - ): - return - if isinstance(request.getfixturevalue("parser"), HttpRequestParserPy): - return - request.node.add_marker( - pytest.mark.xfail( - reason="Regression test for Py parser. May match C behaviour later.", - ) - ) - - @pytest.mark.parametrize("hdr", [b"", b"foo"], ids=["name-empty", "with-name"]) @pytest.mark.parametrize("pad2", _pad.keys(), ids=["post-" + n for n in _pad.values()]) @pytest.mark.parametrize("pad1", _pad.keys(), ids=["pre-" + n for n in _pad.values()]) -@pytest.mark.usefixtures("xfail_c_parser_empty_header") def test_invalid_header_spacing( parser: Any, pad1: bytes, pad2: bytes, hdr: bytes ) -> None: @@ -654,8 +638,6 @@ def test_invalid_header_spacing( def test_empty_header_name(parser: Any) -> None: - if not isinstance(parser, HttpRequestParserPy): - pytest.xfail("Regression test for Py parser. May match C behaviour later.") text = b"GET /test HTTP/1.1\r\n" b":test\r\n\r\n" with pytest.raises(http_exceptions.BadHttpMessage): parser.feed_data(text)