Kaydet (Commit) 8bd9db29 authored tarafından Barry Warsaw's avatar Barry Warsaw

test_boundary_with_leading_space(): Test case for SF bug #1060941. RFC 2046

says boundaries may begin -- but not end -- with whitespace.
üst 9bd57b12
......@@ -1203,6 +1203,25 @@ Content-Transfer-Encoding: 7Bit
----961284236552522269--
''')
def test_boundary_with_leading_space(self):
eq = self.assertEqual
msg = email.message_from_string('''\
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=" XXXX"
-- XXXX
Content-Type: text/plain
-- XXXX
Content-Type: text/plain
-- XXXX--
''')
self.failUnless(msg.is_multipart())
eq(msg.get_boundary(), ' XXXX')
eq(len(msg.get_payload()), 2)
# Test some badly formatted messages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment