diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-09-28 16:21:41 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-09-28 16:21:41 +0100 |
commit | 9229c7a57188168e992145e4f3be6fd381ffe90c (patch) | |
tree | da131bb0c931f55b9651fd45e869d608db855acc /net/http/server.lua | |
parent | 04be6c2e839894756eaf4a3aa53a823508f14b12 (diff) | |
download | prosody-9229c7a57188168e992145e4f3be6fd381ffe90c.tar.gz prosody-9229c7a57188168e992145e4f3be6fd381ffe90c.zip |
net.http.server: Default to HTTP result code 500 when promise is rejected
Diffstat (limited to 'net/http/server.lua')
-rw-r--r-- | net/http/server.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index f563d330..0070367a 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -197,6 +197,7 @@ local function handle_result(request, response, result) result:next(function (ret) handle_result(request, response, ret); end, function (err) + response.status_code = 500; handle_result(request, response, err or 500); end); return true; |