aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_spdy.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-09-24 15:03:10 +0300
committerLoïc Hoguin <[email protected]>2014-09-24 15:03:10 +0300
commitc56bada509a448348ba724841a27abed201b4861 (patch)
tree10162f5c47ad8394f74f12e4105e20488e9c3fd1 /src/cowboy_spdy.erl
parentaa4d86b81f6095316813c599659014c15bf9b935 (diff)
downloadcowboy-c56bada509a448348ba724841a27abed201b4861.tar.gz
cowboy-c56bada509a448348ba724841a27abed201b4861.tar.bz2
cowboy-c56bada509a448348ba724841a27abed201b4861.zip
Remove the error tuple return value for middlewares
It wasn't interesting compared to simply returning a halt tuple with an explicit reply.
Diffstat (limited to 'src/cowboy_spdy.erl')
-rw-r--r--src/cowboy_spdy.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cowboy_spdy.erl b/src/cowboy_spdy.erl
index 5b89c48..3057cca 100644
--- a/src/cowboy_spdy.erl
+++ b/src/cowboy_spdy.erl
@@ -407,9 +407,7 @@ execute(Req, Env, [Middleware|Tail]) ->
erlang:hibernate(?MODULE, resume,
[Env, Tail, Module, Function, Args]);
{halt, Req2} ->
- cowboy_req:ensure_response(Req2, 204);
- {error, Status, Req2} ->
- cowboy_req:reply(Status, Req2)
+ cowboy_req:ensure_response(Req2, 204)
end.
-spec resume(cowboy_middleware:env(), [module()],
@@ -422,9 +420,7 @@ resume(Env, Tail, Module, Function, Args) ->
erlang:hibernate(?MODULE, resume,
[Env, Tail, Module2, Function2, Args2]);
{halt, Req2} ->
- cowboy_req:ensure_response(Req2, 204);
- {error, Status, Req2} ->
- cowboy_req:reply(Status, Req2)
+ cowboy_req:ensure_response(Req2, 204)
end.
%% Reply functions used by cowboy_req.