From 999dc5b7c1665fb620c14f6303610793313efe58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 7 Nov 2014 20:19:05 +0200 Subject: 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. --- test/http_SUITE.erl | 2 +- test/http_SUITE_data/rest_patch_resource.erl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') 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} -> -- cgit v1.2.3