Skip to content

Commit

Permalink
fix-zero-chunk-end-of-request: fix test input
Browse files Browse the repository at this point in the history
The bug was written into the test input. Final chunks did not have a final \r\n which was causing the tests to fail now that the bug is fixed.
  • Loading branch information
seliopou committed Oct 27, 2022
1 parent 3a1cd1d commit e15e87d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib_test/test_server_connection.ml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ let test_echo_post () =
write_response t
~body:"e\r\nThis is a test\r\n"
response;
read_string t "\r\n0\r\n";
read_string t "\r\n0\r\n\r\n";
write_string t "0\r\n\r\n";
writer_yielded t;

Expand All @@ -427,7 +427,7 @@ let test_echo_post () =
response;
read_string t "\r\n21\r\n... that involves multiple chunks";
write_string t "21\r\n... that involves multiple chunks\r\n";
read_string t "\r\n0\r\n";
read_string t "\r\n0\r\n\r\n";
write_string t "0\r\n\r\n";
writer_yielded t;

Expand All @@ -442,7 +442,7 @@ let test_echo_post () =
~body:"This is a test"
response;
read_string t "\r\n21\r\n... that involves multiple chunks";
read_string t "\r\n0\r\n";
read_string t "\r\n0\r\n\r\n";
write_string t "... that involves multiple chunks";
connection_is_shutdown t;
;;
Expand Down

0 comments on commit e15e87d

Please sign in to comment.