anchor.diff:  %%
   %% make environment
   %% @todo: handle cookie and request as PHP $_REQUEST
  -% make_env(_Head, #stream{peer=Peer}) ->
  -%    [
  -%       {peer, Peer}
  -%    ].
   make_env(_Head, Peer) -> 
      [
         {peer, uri:authority(Peer, uri:new(http))}
  
positive.code: 
  'IDLE'({accept,  Uri}, Pipe, State) ->
     pipe:b(Pipe, {accept, Uri}),
     {next_state, 'STREAM', State#fsm{mode = server}};
  
  'IDLE'({connect, Uri}, Pipe, State) ->
     % connect is compatibility wrapper for knet socket interface (translated to http GET request)
     % @todo: htstream support HTTP/1.2 (see http://www.jmarshall.com/easy/http/)
     'IDLE'({'GET', Uri, [{'Connection', <<"keep-alive">>}]}, Pipe, State);
  
  'IDLE'({_Mthd, {uri, _, _}=Uri, _Head}=Req, Pipe, State) ->
     pipe:b(Pipe, {connect, Uri}),
     'STREAM'(Req, Pipe, State#fsm{mode = client});
  
  'IDLE'({_Mthd, {uri, _, _}=Uri, _Head, _Msg}=Req, Pipe, State) ->
     pipe:b(Pipe, {connect, Uri}),
     'STREAM'(Req, Pipe, State#fsm{mode = client}).
  
  %%%------------------------------------------------------------------
  %%%
  
negative.code: 
  %%
  %%
  http_request_log(#http{is = eof, http = {response, _}, state = #fsm{queue = Q, peer = Peer}} = Http) ->
     #req{
        http = {_, {Mthd,  Url, HeadA}}, 
        code = {_, {Code, _Msg, HeadB}}, 
  