提交 c41ed929 编写于 作者: E Elliott Wood 提交者: Michael Koziarski

Removed the "charset" parameter from the Content-Type header of multipart...

Removed the "charset" parameter from the Content-Type header of multipart sections of nested multipart messages.
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
[#2109 state:committed]
上级 38136f86
......@@ -88,7 +88,10 @@ def to_mail(defaults)
part.parts << prt
end
part.set_content_type(real_content_type, nil, ctype_attrs) if real_content_type =~ /multipart/
if real_content_type =~ /multipart/
ctype_attrs.delete 'charset'
part.set_content_type(real_content_type, nil, ctype_attrs)
end
end
headers.each { |k,v| part[k] = v }
......
......@@ -330,6 +330,7 @@ def test_nested_parts
assert_equal "multipart/mixed", created.content_type
assert_equal "multipart/alternative", created.parts.first.content_type
assert_equal "bar", created.parts.first.header['foo'].to_s
assert_nil created.parts.first.charset
assert_equal "text/plain", created.parts.first.parts.first.content_type
assert_equal "text/html", created.parts.first.parts[1].content_type
assert_equal "application/octet-stream", created.parts[1].content_type
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册