anchor.diff:  new_part(Data, MP) ->
       try_headers(Data, MP).
   
  -form_data(#mp{parts=Parts, acc=Acc}) ->
  -    [{parts, lists:reverse(Parts)},
  -     {acc, Acc}].
  +form_data(#mp{parts=Parts}) ->
  +    lists:reverse(Parts).
  
positive.code: -module(psycho_multipart).
  
  -export([new/3, data/2, form_data/1]).
  
  -record(mp, {boundary_delim, parts, headers, acc}).
  
  new(Boundary, _Callback, _Data) when is_binary(Boundary) ->
      #mp{
         boundary_delim=boundary_delim(Boundary),
         parts=[],
  
negative.code:     MP#mp{headers=Headers}.
  
  parse_headers(<<"\r\n", Raw/binary>>) ->
      [parse_header(Part) || Part <- split_headers(Raw)];
  parse_headers(_) -> [].
  
  split_headers(Raw) ->
      binary:split(Raw, <<"\r\n">>, [global]).
  
  parse_header(Raw) ->
      case binary:split(Raw, <<":">>) of
          [Name, RawVal] -> {binary_to_list(Name), header_val(RawVal)};
          [Name] -> {binary_to_list(Name), <<>>}
      end.
  
  header_val(<<" ", Val/binary>>) -> binary_to_list(Val);
  header_val(Val) -> binary_to_list(Val).
  
  start_body(Data, MP) -> MP#mp{acc=[Data]}.
  
  add_cur(#mp{headers=Headers, acc=Acc, parts=Parts}=MP) ->
      Name = form_data_name(Headers),
      Body = finalize_body(Acc),
      Part = {Name, Headers, Body},
      MP#mp{parts=[Part|Parts], headers=pending, acc=[]}.
  
  -define(FORM_DATA_NAME_RE, <<"form-data; *name=\"(.*?)\"">>).
  
  form_data_name(Headers) ->
      Disp = proplists:get_value("Content-Disposition", Headers, ""),
      handle_form_data_name_re(
        re:run(Disp, ?FORM_DATA_NAME_RE, [{capture, [1], list}])).
  
  handle_form_data_name_re({match, [Name]}) -> Name;
  handle_form_data_name_re(nomatch) -> <<>>.
  
  finalize_body([]) -> <<>>;
  finalize_body([Last|Rest]) ->
  