mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Fix error responses not including a content-length
This would prevent the client from knowing whether the request was received fully without the connection closing first.
This commit is contained in:
parent
353dc29d8f
commit
3b91523a3c
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ info(_StreamID, {'EXIT', Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#
|
|||
%% @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?
|
||||
{[{error_response, 400, #{}, <<>>}, stop], State};
|
||||
{[{error_response, 400, #{<<"content-length">> => <<"0">>}, <<>>}, stop], State};
|
||||
info(StreamID, Exit = {'EXIT', Pid, {Reason, Stacktrace}}, State=#state{ref=Ref, pid=Pid}) ->
|
||||
report_crash(Ref, StreamID, Pid, Reason, Stacktrace),
|
||||
{[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue