aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_spdy.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-07-12 12:09:43 +0200
committerLoïc Hoguin <[email protected]>2014-07-12 12:09:43 +0200
commit97a3108576c6a9d64c03e1455654dba88367992a (patch)
treec9701a8ba567e777509e0fd3508ed6f0bc6b5ea0 /src/cowboy_spdy.erl
parent20f598f3736cdaab8fd0e9de09f16d18d1dc97f8 (diff)
downloadcowboy-97a3108576c6a9d64c03e1455654dba88367992a.tar.gz
cowboy-97a3108576c6a9d64c03e1455654dba88367992a.tar.bz2
cowboy-97a3108576c6a9d64c03e1455654dba88367992a.zip
Reply with 400 on header parsing crash
This is a first step to improve the HTTP status codes returned by Cowboy on crashes. We will tweak it over time. Also fixes a small bug where two replies may have been sent when using loop handlers under rare conditions.
Diffstat (limited to 'src/cowboy_spdy.erl')
-rw-r--r--src/cowboy_spdy.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_spdy.erl b/src/cowboy_spdy.erl
index faea142..8da9613 100644
--- a/src/cowboy_spdy.erl
+++ b/src/cowboy_spdy.erl
@@ -422,7 +422,7 @@ execute(Req, Env, [Middleware|Tail]) ->
{halt, Req2} ->
cowboy_req:ensure_response(Req2, 204);
{error, Status, Req2} ->
- cowboy_req:maybe_reply(Status, Req2)
+ cowboy_req:reply(Status, Req2)
end.
-spec resume(cowboy_middleware:env(), [module()],
@@ -437,7 +437,7 @@ resume(Env, Tail, Module, Function, Args) ->
{halt, Req2} ->
cowboy_req:ensure_response(Req2, 204);
{error, Status, Req2} ->
- cowboy_req:maybe_reply(Status, Req2)
+ cowboy_req:reply(Status, Req2)
end.
%% Reply functions used by cowboy_req.