anchor.diff:  pop_last([]) -> [];
   pop_last([_|Rest]) -> Rest.
   
  --define(HEADERS_DELIM, <<"\r\n\r\n">>).
  -
   try_headers(Data, MP) ->
       try_headers(Data, Data, MP).
  +
  +-define(HEADERS_DELIM, <<"\r\n\r\n">>).
   
   try_headers(Window, Data, #mp{headers=pending}=MP) ->
       handle_match_headers(
  
positive.code: data(Data, MP) ->
      try_boundary(Data, MP).
  
  try_boundary(Data, #mp{boundary_delim=Delim, acc=Acc}=MP) ->
      Window = search_window(Data, Acc),
      handle_boundary_match(binary:match(Window, Delim), Window, Data, MP).
  
  search_window(Data, []) ->
      Data;
  search_window(Data, [Last|_]) ->
      join(Last, Data).
  
  join(B1, B2) ->
      <<B1/binary, B2/binary>>.
  
  handle_boundary_match(nomatch, Window, Data, MP) ->
      try_headers(Window, Data, MP);
  
negative.code: -module(psycho_multipart).
  
  -export([new/1, new/2, data/2, form_data/1]).
  
  -record(mp, {boundary_delim, parts, headers, acc}).
  
  new(Boundary) ->
      new(Boundary, {undefined, undefined}).
  
  new(Boundary, {_Callback, _Data}) when is_binary(Boundary) ->
      #mp{
         boundary_delim=boundary_delim(Boundary),
         parts=[],
  