mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-21 11:30:01 +00:00
Closing connection on 5xx errors
This commit is contained in:
1 parent
bba29d32ce
commit
88cf329490
2 files changed
+8
No files matched your search
@@ -145,6 +145,10 @@ static void send_http_error(struct mg_connection *conn, int status,
|
||||
suggest_connection_header(conn));
|
||||
conn->num_bytes_sent += mg_printf(conn, "%s", buf);
|
||||
}
|
||||
|
||||
if (status >= 500) {
|
||||
conn->must_close = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Return 1 if real file has been found, 0 otherwise
|
||||
|
||||
Reference in new issue
Block a user