aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-11-07 20:19:05 +0200
committerLoïc Hoguin <[email protected]>2014-11-07 20:19:05 +0200
commit999dc5b7c1665fb620c14f6303610793313efe58 (patch)
tree8371be2957e20b40fa9b5b93c63e414510e93c2e /test
parent8cbd8c1882e33380875f2723cad258784ba3a360 (diff)
downloadcowboy-999dc5b7c1665fb620c14f6303610793313efe58.tar.gz
cowboy-999dc5b7c1665fb620c14f6303610793313efe58.tar.bz2
cowboy-999dc5b7c1665fb620c14f6303610793313efe58.zip
Rename 'halt' to 'stop' for better consistency
Now everywhere in Cowboy when we want to stop something we return a 'stop' tuple instead of one of the many choices depending on context that we had before. This particular change affects middlewares, sub protocols and REST handlers which were using 'halt' to stop processing.
Diffstat (limited to 'test')
-rw-r--r--test/http_SUITE.erl2
-rw-r--r--test/http_SUITE_data/rest_patch_resource.erl4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index bd0f247..1b819ae 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -706,7 +706,7 @@ rest_patch(Config) ->
Tests = [
{204, [{<<"content-type">>, <<"text/plain">>}], <<"whatever">>},
{400, [{<<"content-type">>, <<"text/plain">>}], <<"false">>},
- {400, [{<<"content-type">>, <<"text/plain">>}], <<"halt">>},
+ {400, [{<<"content-type">>, <<"text/plain">>}], <<"stop">>},
{415, [{<<"content-type">>, <<"application/json">>}], <<"bad_content_type">>}
],
ConnPid = gun_open(Config),
diff --git a/test/http_SUITE_data/rest_patch_resource.erl b/test/http_SUITE_data/rest_patch_resource.erl
index 03f780f..c1244e7 100644
--- a/test/http_SUITE_data/rest_patch_resource.erl
+++ b/test/http_SUITE_data/rest_patch_resource.erl
@@ -29,8 +29,8 @@ content_types_accepted(Req, State) ->
patch_text_plain(Req, State) ->
case cowboy_req:body(Req) of
- {ok, <<"halt">>, Req0} ->
- {halt, cowboy_req:reply(400, Req0), State};
+ {ok, <<"stop">>, Req0} ->
+ {stop, cowboy_req:reply(400, Req0), State};
{ok, <<"false">>, Req0} ->
{false, Req0, State};
{ok, _Body, Req0} ->