Skip to content

Commit 89ad5b4

Browse files
committed
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.
1 parent a2ed91d commit 89ad5b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
User-Agent: Fooo\r
3434
Host: bar\r
3535
Transfer-Encoding: chunked\r
36-
36+
\r
3737
5\r\nhello\r\n6\r\n world\r\n'''
3838

3939
CHUNKED_REQUEST1_2 = b'''0\r\nVary: *\r\nUser-Agent: spam\r\n\r\n'''
@@ -42,7 +42,7 @@
4242
User-Agent: Fooo\r
4343
Host: bar\r
4444
Transfer-Encoding: chunked\r
45-
45+
\r
4646
b\r\n+\xce\xcfM\xb5MI,I\x04\x00\r\n0\r\n\r\n'''
4747

4848

@@ -54,7 +54,7 @@
5454
Upgrade: WebSocket\r
5555
Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r
5656
Origin: http://example.com\r
57-
57+
\r
5858
Hot diggity dogg'''
5959

6060
UPGRADE_RESPONSE1 = b'''HTTP/1.1 101 Switching Protocols

0 commit comments

Comments
 (0)