diff options
Diffstat (limited to 'test/http_SUITE_data/http_echo_body.erl')
-rw-r--r-- | test/http_SUITE_data/http_echo_body.erl | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/http_SUITE_data/http_echo_body.erl b/test/http_SUITE_data/http_echo_body.erl index 8743844..c76b9b3 100644 --- a/test/http_SUITE_data/http_echo_body.erl +++ b/test/http_SUITE_data/http_echo_body.erl @@ -3,18 +3,14 @@ -module(http_echo_body). -export([init/2]). --export([handle/2]). init(Req, Opts) -> - {http, Req, Opts}. - -handle(Req, State) -> true = cowboy_req:has_body(Req), Req3 = case cowboy_req:body(Req, [{length, 1000000}]) of {ok, Body, Req2} -> handle_body(Req2, Body); {more, _, Req2} -> handle_badlength(Req2) end, - {ok, Req3, State}. + {ok, Req3, Opts}. handle_badlength(Req) -> cowboy_req:reply(413, [], <<"Request entity too large">>, Req). |