anchor.diff:      test_parse2(),
       test_parse3(),
       test_parse_form(),
  -    ok.
  +    test_flash_parse(),
  +    test_flash_parse2(),
  +    ok.
  
positive.code:     Chunk = read_chunk(Req, Length),
      Length1 = Length - size(Chunk),
      <<"--", Boundary:BS/binary, "\r\n", Rest/binary>> = Chunk,
      feed_mp(headers, #mp{boundary=Prefix,
                           length=Length1,
                           buffer=Rest,
                           callback=Callback,
                           req=Req}).
  
  parse_headers(<<>>) ->
      [];
  
negative.code: read_more(State=#mp{length=Length, buffer=Buffer, req=Req}) ->
      Data = read_chunk(Req, Length),
      Buffer1 = <<Buffer/binary, Data/binary>>,
      flash_multipart_hack(State#mp{length=Length - size(Data),
                                    buffer=Buffer1}).
  
  flash_multipart_hack(State=#mp{length=0, buffer=Buffer, boundary=Prefix}) ->
      %% http://code.google.com/p/mochiweb/issues/detail?id=22
      %% Flash doesn't terminate multipart with \r\n properly so we fix it up here
      PrefixSize = size(Prefix),
      case size(Buffer) - (2 + PrefixSize) of
          Seek when Seek >= 0 ->
              case Buffer of
                  <<_:Seek/binary, Prefix:PrefixSize/binary, "--">> ->
                      Buffer1 = <<Buffer/binary, "\r\n">>,
                      State#mp{buffer=Buffer1};
                  _ ->
                      State
              end;
          _ ->
              State
      end;
  flash_multipart_hack(State) ->
      State.
  
  feed_mp(headers, State=#mp{buffer=Buffer, callback=Callback}) ->
      {State1, P} = case find_in_binary(<<"\r\n\r\n">>, Buffer) of
  