anchor.diff:       <<"\r\n--">>, Boundary, <<"--\r\n">>].
   
   encode_multipart_item({MD, V}) ->
  -    [<<"Content-Type: ">>,
  -     proplists:get_value(<<"content-type">>, MD, <<"application/octet-stream">>),
  -     <<"\r\n">>,
  -     <<"Content-Transfer-Encoding: binary\r\n">>,
  +    Hdrs = make_headers(MD),
  +    [[[Key, <<": ">>, Value, <<"\r\n">>] || {Key, Value} <- Hdrs],
  +     <<"content-transfer-encoding: binary\r\n">>,
        <<"\r\n">>, V].
   
   stringify_metadata(MD) ->
  
positive.code:     stringify_metadata(Tail, [{binary_to_list(K), binary_to_list(V)}|Acc]);
  stringify_metadata([], Acc) ->
      lists:reverse(Acc).
  
negative.code: 
  encode_body(normal, _, Msg) ->
      {MD, V} = proplists:get_value(content, Msg),
      {make_headers(MD), V};
  encode_body(compound, multipart, Msg) ->
      Boundary = proplists:get_value(id, Msg),
      Hdrs = [{<<"content-type">>, <<"multipart/mixed; boundary=", Boundary/binary>>}],
      V = to_multipart(Boundary, proplists:get_value(content, Msg)),
      {Hdrs, V};
  encode_body(compound, msgpack, Msg) ->
      Hdrs = [{<<"content-type">>, <<"application/x-msgpack">>}],
      V = [[{stringify_metadata(make_headers(MD))}, V] || {MD, V} <- proplists:get_value(content, Msg)],
      {Hdrs, msgpack:pack(V, [{enable_str, true}])}.
  
  make_headers(MD) ->
      case proplists:is_defined(<<"content-type">>, MD) of
          true -> MD;
          false -> [{<<"content-type">>, <<"application/octet-stream">>}|MD]
      end.
  
  to_multipart(Boundary, Contents) when is_list(Contents) ->
      [[[<<"\r\n--">>, Boundary, <<"\r\n">>, encode_multipart_item(C)]
  