mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Removed the "charset" parameter from the Content-Type header of multipart sections of nested multipart messages.
Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2109 state:committed]
This commit is contained in:
parent
38136f86dc
commit
c41ed929bb
2 changed files with 5 additions and 1 deletions
|
@ -88,7 +88,10 @@ module ActionMailer
|
|||
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 @@ class ActionMailerTest < Test::Unit::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue