Skip to content
Browse files

Don't double-fold headers

  • Loading branch information...
1 parent 82cd234 commit 40fd7c46743fd9065560cfd24021b643c2854704 @Vagabond committed May 12, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/mimemail.erl
View
6 src/mimemail.erl
@@ -565,7 +565,7 @@ ensure_content_headers([Header | Tail], Type, SubType, Parameters, Headers, Body
end,
%CTP = proplists:get_value(<<"content-type-params">>, Parameters, [guess_charset(Body)]),
- CTH = binstr:join([CT | encode_parameters(CTP)], ";\r\n\t"),
+ CTH = binstr:join([CT | encode_parameters(CTP)], ";"),
NewParameters = [{<<"content-type-params">>, CTP} | proplists:delete(<<"content-type-params">>, Parameters)],
ensure_content_headers(Tail, Type, SubType, NewParameters, [{<<"Content-Type">>, CTH} | Headers], Body, Toplevel);
undefined when Header == <<"Content-Type">> ->
@@ -582,7 +582,7 @@ ensure_content_headers([Header | Tail], Type, SubType, Parameters, Headers, Body
ensure_content_headers(Tail, Type, SubType, Parameters, Headers, Body, Toplevel);
_ ->
CTP = [{<<"charset">>, Charset} | proplists:delete(<<"charset">>, proplists:get_value(<<"content-type-params">>, Parameters, []))],
- CTH = binstr:join([<<"text/plain">> | encode_parameters(CTP)], ";\r\n\t"),
+ CTH = binstr:join([<<"text/plain">> | encode_parameters(CTP)], ";"),
NewParameters = [{<<"content-type-params">>, CTP} | proplists:delete(<<"content-type-params">>, Parameters)],
ensure_content_headers(Tail, Type, SubType, NewParameters, [{<<"Content-Type">>, CTH} | Headers], Body, Toplevel)
end;
@@ -602,7 +602,7 @@ ensure_content_headers([Header | Tail], Type, SubType, Parameters, Headers, Body
undefined when Header == <<"Content-Disposition">>, Toplevel == false ->
CD = proplists:get_value(<<"disposition">>, Parameters, <<"inline">>),
CDP = proplists:get_value(<<"disposition-params">>, Parameters, []),
- CDH = binstr:join([CD | encode_parameters(CDP)], ";\r\n\t"),
+ CDH = binstr:join([CD | encode_parameters(CDP)], ";"),
ensure_content_headers(Tail, Type, SubType, Parameters, [{<<"Content-Disposition">>, CDH} | Headers], Body, Toplevel);
_ ->
ensure_content_headers(Tail, Type, SubType, Parameters, Headers, Body, Toplevel)

0 comments on commit 40fd7c4

Please sign in to comment.
Something went wrong with that request. Please try again.