Skip to content

Commit

Permalink
Fix missing CR is some tests (#112)
Browse files Browse the repository at this point in the history
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 authored Oct 16, 2024
1 parent a2ed91d commit 21a199d
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 21a199d

Please sign in to comment.