0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Catch more 400 errors

This commit is contained in:
Loïc Hoguin 2017-07-12 19:20:31 +02:00
parent 3c18585945
commit ff3915a243
No known key found for this signature in database
GPG key ID: 71366FF21851DF03

View file

@ -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?