aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-10-04 22:59:33 +0200
committerLoïc Hoguin <[email protected]>2012-10-04 22:59:33 +0200
commit76cd1e40c933e60ed507474cceea4e25e10db225 (patch)
tree1accc06834f01152daef70ed6397ed7e38af5e08 /test/http_SUITE.erl
parent7367f07ca00c4fa4dd14792cc95251ef9c9207b1 (diff)
downloadcowboy-76cd1e40c933e60ed507474cceea4e25e10db225.tar.gz
cowboy-76cd1e40c933e60ed507474cceea4e25e10db225.tar.bz2
cowboy-76cd1e40c933e60ed507474cceea4e25e10db225.zip
The onresponse hook now receives 4 arguments, including the body
We do not always provide the body however. It is not available when using chunked replies, or when using set_resp_body_fun.
Diffstat (limited to 'test/http_SUITE.erl')
-rw-r--r--test/http_SUITE.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index cb59c07..2459d5e 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -188,7 +188,7 @@ init_per_group(onresponse, Config) ->
{ok, _} = cowboy:start_http(onresponse, 100, [{port, Port}], [
{dispatch, init_dispatch(Config)},
{max_keepalive, 50},
- {onresponse, fun onresponse_hook/3},
+ {onresponse, fun onresponse_hook/4},
{timeout, 500}
]),
{ok, Client} = cowboy_client:init([]),
@@ -623,7 +623,7 @@ onresponse_reply(Config) ->
{error, closed} = cowboy_client:response_body(Client3).
%% Hook for the above onresponse tests.
-onresponse_hook(_, Headers, Req) ->
+onresponse_hook(_, Headers, _, Req) ->
{ok, Req2} = cowboy_req:reply(
<<"777 Lucky">>, [{<<"x-hook">>, <<"onresponse">>}|Headers], Req),
Req2.