aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/loop_handler_body_h.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-10 17:15:02 +0200
committerLoïc Hoguin <[email protected]>2016-08-10 17:15:02 +0200
commite30d120bd8c9a4a7b469937d5b5be6a8dfe148d4 (patch)
tree5eb48865b2ad61d3c05bdc0e3e1f639a6b966ffe /test/handlers/loop_handler_body_h.erl
parentaa6f2ab5a48d90e47648dfb53e0894dcaa6f6aac (diff)
downloadcowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.gz
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.bz2
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.zip
Make reply functions return Req
Diffstat (limited to 'test/handlers/loop_handler_body_h.erl')
-rw-r--r--test/handlers/loop_handler_body_h.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/handlers/loop_handler_body_h.erl b/test/handlers/loop_handler_body_h.erl
index 38ba2c0..e0ea41b 100644
--- a/test/handlers/loop_handler_body_h.erl
+++ b/test/handlers/loop_handler_body_h.erl
@@ -13,11 +13,10 @@ init(Req, _) ->
self() ! timeout,
{cowboy_loop, Req, undefined, 5000, hibernate}.
-info(timeout, Req, State) ->
- {ok, Body, Req2} = cowboy_req:read_body(Req),
+info(timeout, Req0, State) ->
+ {ok, Body, Req} = cowboy_req:read_body(Req0),
100000 = byte_size(Body),
- cowboy_req:reply(200, Req2),
- {stop, Req, State}.
+ {stop, cowboy_req:reply(200, Req), State}.
terminate(stop, _, _) ->
ok.