From 89ad5b43a685b0a85c9a8acecefb17d26c285d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 16 Oct 2024 19:14:16 +0200 Subject: [PATCH] Fix missing CR is some tests Some of the tests explicitly add "\r" to line endings but fail to do so in empty lines. This causes parsing failures in llhttp-9. Fix them to use CRLF consistently across all lines. --- tests/test_parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_parser.py b/tests/test_parser.py index a169a9a..7535e1f 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -33,7 +33,7 @@ User-Agent: Fooo\r Host: bar\r Transfer-Encoding: chunked\r - +\r 5\r\nhello\r\n6\r\n world\r\n''' CHUNKED_REQUEST1_2 = b'''0\r\nVary: *\r\nUser-Agent: spam\r\n\r\n''' @@ -42,7 +42,7 @@ User-Agent: Fooo\r Host: bar\r Transfer-Encoding: chunked\r - +\r b\r\n+\xce\xcfM\xb5MI,I\x04\x00\r\n0\r\n\r\n''' @@ -54,7 +54,7 @@ Upgrade: WebSocket\r Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r Origin: http://example.com\r - +\r Hot diggity dogg''' UPGRADE_RESPONSE1 = b'''HTTP/1.1 101 Switching Protocols