aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/http_handler_stream_body.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/http_handler_stream_body.erl b/test/http_handler_stream_body.erl
index feb4f78..15870a8 100644
--- a/test/http_handler_stream_body.erl
+++ b/test/http_handler_stream_body.erl
@@ -13,8 +13,7 @@ init({_Transport, http}, Req, Opts) ->
{ok, Req, #state{headers=Headers, body=Body, reply=Reply}}.
handle(Req, State=#state{headers=_Headers, body=Body, reply=set_resp}) ->
- {ok, Transport, Socket} = cowboy_req:transport(Req),
- SFun = fun() -> Transport:send(Socket, Body), sent end,
+ SFun = fun(Socket, Transport) -> Transport:send(Socket, Body) end,
SLen = iolist_size(Body),
Req2 = cowboy_req:set_resp_body_fun(SLen, SFun, Req),
{ok, Req3} = cowboy_req:reply(200, Req2),