Add test to parse_multipart_form_data() when no "name" parameter is found
This commit is contained in:
parent
97009a380e
commit
b12edb12d5
|
@ -162,6 +162,18 @@ Foo--1234--''').replace(b("\n"), b("\r\n"))
|
||||||
parse_multipart_form_data(b("1234"), data, args, files)
|
parse_multipart_form_data(b("1234"), data, args, files)
|
||||||
self.assertEqual(files, {})
|
self.assertEqual(files, {})
|
||||||
|
|
||||||
|
def test_content_disposition_header_without_name_parameter(self):
|
||||||
|
data = b("""\
|
||||||
|
--1234
|
||||||
|
Content-Disposition: form-data; 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):
|
class HTTPHeadersTest(unittest.TestCase):
|
||||||
def test_multi_line(self):
|
def test_multi_line(self):
|
||||||
|
|
Loading…
Reference in New Issue