anchor.diff:  encode(Pckt, Acc, #http{is=entity, length=Len}=S)
    when is_integer(Len), size(Pckt) < Len ->
      {lists:reverse([Pckt  | Acc]), S#http{length=Len - size(Pckt)}};
  -   
  +
   encode(Pckt, Acc, #http{is=entity, length=Len}=S)
    when is_integer(Len) ->
      %% TODO: preserve Rest to sndbuf
  
positive.code: 
  %%
  encode_http_request({Mthd, Url, _}=Msg, S) ->
     Http = iolist_to_binary([atom_to_binary(Mthd, utf8), $ , Url, $ , encode_version(S#http.version), $\r, $\n]),
     encode(Msg, [Http], S#http{is=header});
  encode_http_request({Mthd, Url, _, _}=Msg, S) ->
     Http = iolist_to_binary([atom_to_binary(Mthd, utf8), $ , Url, $ , encode_version(S#http.version), $\r, $\n]),
     encode(Msg, [Http], S#http{is=header}).
  
  encode_http_response({Status, _}=Msg, S) ->
  
negative.code:       {'Connection', <<"close">>} ->
           {ok, S#http{is=eoh, length=inf}};
        _ ->
           % look like http request / response go not carry on any payload
           {ok, S#http{is=eof}}
     end.
  
  
  