server : do not overwrite 404 if status is 500 from exception_handler

This commit is contained in:
jhen 2023-08-21 16:02:32 +08:00
parent 3f9fa77fe0
commit 1f373e349e

View file

@ -1407,7 +1407,7 @@ int main(int argc, char **argv)
{ {
if (res.status == 400) { if (res.status == 400) {
res.set_content("Invalid request", "text/plain"); res.set_content("Invalid request", "text/plain");
} else { } else if (res.status != 500) {
res.set_content("File Not Found", "text/plain"); res.set_content("File Not Found", "text/plain");
res.status = 404; res.status = 404;
} }); } });