Commit 88cf3294 authored by Sergey Lyubka's avatar Sergey Lyubka

Closing connection on 5xx errors

parent bba29d32
......@@ -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
......
......@@ -4016,6 +4016,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment