anchor.diff:  -include_lib("eunit/include/eunit.hrl").
   -endif.
   
  +-type resp_body_fun() :: fun(() -> {sent, non_neg_integer()}).
  +
   -record(http_req, {
   	%% Transport.
   	socket = undefined :: undefined | inet:socket(),
  
positive.code: %% `reply/3'.
  %%
  %% @see cowboy_req:transport/1.
  -spec set_resp_body_fun(non_neg_integer(),
  	fun(() -> {sent, non_neg_integer()}), Req) -> Req when Req::req().
  set_resp_body_fun(StreamLen, StreamFun, Req) ->
  	Req#http_req{resp_body={StreamLen, StreamFun}}.
  
  
negative.code: 		resp_state=waiting, resp_headers=RespHeaders}) ->
  	{_, Req2} = response(Status, Headers, RespHeaders, [
  		{<<"connection">>, <<"Upgrade">>}
  	], <<>>, Req),
  	{ok, Req2#http_req{resp_state=done, resp_headers=[], resp_body= <<>>}}.
  
  %% @doc Ensure the response has been sent fully.
  