mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Fix handler crashes handling
We try to send a 500 error only if we didn't send the response headers yet. If they were, then we have no way to be sure the response was fully sent, nor should we assume anything about how this will be handled client-side, so we do nothing more and in both cases close the connection.
This commit is contained in:
parent
ba87aa4193
commit
fd211d3c03
4 changed files with 31 additions and 11 deletions
|
@ -46,6 +46,7 @@
|
|||
connection = keepalive :: keepalive | close,
|
||||
|
||||
%% Request.
|
||||
pid = undefined :: pid(),
|
||||
method = 'GET' :: http_method(),
|
||||
version = {1, 1} :: http_version(),
|
||||
peer = undefined :: undefined | {inet:ip_address(), inet:ip_port()},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue