diff --git a/tornado/test/httputil_test.py b/tornado/test/httputil_test.py index b2d0d79b..2755c5b1 100644 --- a/tornado/test/httputil_test.py +++ b/tornado/test/httputil_test.py @@ -139,6 +139,19 @@ Foo parse_multipart_form_data(b("1234"), data, args, files) self.assertEqual(files, {}) + def test_invalid_content_disposition(self): + data = b('''\ +--1234 +Content-Disposition: invalid; name="files"; filename="ab.txt" + +Foo +--1234--''').replace(b("\n"), b("\r\n")) + args = {} + files = {} + parse_multipart_form_data(b("1234"), data, args, files) + self.assertEqual(files, {}) + + class HTTPHeadersTest(unittest.TestCase): def test_multi_line(self): # Lines beginning with whitespace are appended to the previous line