summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2022-03-12 19:16:23 -0700
committerBert JW Regeer <bertjw@regeer.org>2022-03-12 19:48:25 -0700
commitbd22869c143a3f1284f271399524676efbafa655 (patch)
tree146310721d191ade6cf05b650d2f0f0d125ea0ae /tests
parentd9bdfa0cf210f6daf017d7c5a3cc149bdec8a9a7 (diff)
downloadwaitress-bd22869c143a3f1284f271399524676efbafa655.tar.gz
Remove extraneous calls to .strip() in Chunked Encoding
To be valid chunked encoding we should not be removing any whitespace as the standard does not allow for optional whitespace. If whitespace is encountered in the wrong place, it should lead to a 400 Bad Request instead.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_receiver.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_receiver.py b/tests/test_receiver.py
index 8e43cc8..d160cac 100644
--- a/tests/test_receiver.py
+++ b/tests/test_receiver.py
@@ -262,7 +262,9 @@ class TestChunkedReceiverParametrized:
assert result == len(data)
assert inst.error == None
- @pytest.mark.parametrize("invalid_size", [b"0x04", b"+0x04", b"x04", b"+04"])
+ @pytest.mark.parametrize(
+ "invalid_size", [b"0x04", b"+0x04", b"x04", b"+04", b" 04", b" 0x04"]
+ )
def test_received_invalid_size(self, invalid_size):
from waitress.utilities import BadRequest