aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-07-12 19:20:31 +0200
committerLoïc Hoguin <[email protected]>2017-07-12 19:20:31 +0200
commitff3915a24381970477e99b67277242c7f99a22f9 (patch)
treefd92448ccf4f1e02f5eb9dd811c51922977df8ef
parent3c185859451c2d94051c7c7d26d23a6f210eb579 (diff)
downloadcowboy-ff3915a24381970477e99b67277242c7f99a22f9.tar.gz
cowboy-ff3915a24381970477e99b67277242c7f99a22f9.tar.bz2
cowboy-ff3915a24381970477e99b67277242c7f99a22f9.zip
Catch more 400 errors
-rw-r--r--src/cowboy_stream_h.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_stream_h.erl b/src/cowboy_stream_h.erl
index 5d64e8d..5113f2e 100644
--- a/src/cowboy_stream_h.erl
+++ b/src/cowboy_stream_h.erl
@@ -71,7 +71,8 @@ data(_StreamID, IsFin, Data, State=#state{pid=Pid, read_body_ref=Ref,
info(_StreamID, {'EXIT', Pid, normal}, State=#state{pid=Pid}) ->
%% @todo Do we even reach this clause?
{[stop], State};
-info(_StreamID, {'EXIT', Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#state{pid=Pid}) ->
+info(_StreamID, {'EXIT', Pid, {_Reason, [T1, T2|_]}}, State=#state{pid=Pid})
+ when element(1, T1) =:= cow_http_hd; element(1, T2) =:= cow_http_hd ->
%% @todo Have an option to enable/disable this specific crash report?
%%report_crash(Ref, StreamID, Pid, Reason, Stacktrace),
%% @todo Headers? Details in body? More stuff in debug only?