Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
mgorny committed Oct 16, 2024
commit 89ad5b43a685b0a85c9a8acecefb17d26c285d56
6 changes: 3 additions & 3 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'''
Expand All @@ -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'''


Expand All @@ -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
Expand Down