anchor.diff:        {Input, Buffer, Http} = htstream:decode(iolist_to_binary([S#fsm.iobuffer, Pckt]), S#fsm.dec),
         handle_listen(htstream:state(Http), Input, Pipe, S#fsm{iobuffer=Buffer, dec=Http})
      catch _:Reason ->
  -      handle_failure(Reason, Pipe, S),
  +      {Err, _, _} = htstream:encode({Reason, [{'Server', ?HTTP_SERVER}]}),
  +      _ = pipe:a(Pipe, {send, S#fsm.peer, Err}),
         {next_state, 'LISTEN', S}
      end;
   
  
positive.code:    % http request with payload
     Url = make_url(Uri, Heads, S#fsm.scheme),
     _   = pipe:b(Pipe, {http, Url, {Method, Heads}}),
     {Chunk, Buffer, Http} = htstream:parse(S#fsm.iobuffer, S#fsm.dec),
     handle_request(htstream:state(Http), Chunk, Pipe, S#fsm{url=Url, iobuffer=Buffer, dec=Http});
  
  handle_listen(_, Chunk, Pipe, S) ->
  
negative.code:       {Chunk, Buffer, Http} = htstream:decode(iolist_to_binary([S#fsm.iobuffer, Pckt]), S#fsm.dec),
        handle_request(htstream:state(Http), Chunk, Pipe, S#fsm{iobuffer=Buffer, dec=Http})
     catch _:Reason ->
        {Err, _, _} = htstream:encode({Reason, [{'Server', ?HTTP_SERVER}]}),
        _ = pipe:a(Pipe, {send, S#fsm.peer, Err}),
        {next_state, 'LISTEN', S}
     end;
  
  