don't try to send 408 error to closed client socket

read_request_line() is exercised on the client's fd, and it fails
when the client closed the connection. therefore it's wrong
to send an error message to the client in this situation.
additionally, the error message states that the server closed
the connection.

might fix #383
This commit is contained in:
rofl0r 2022-05-02 14:50:42 +00:00
parent 235b1c10a7
commit 7d1e86ccae

View File

@ -1622,11 +1622,7 @@ void handle_connection (struct conn_s *connptr, union sockaddr_union* addr)
if (read_request_line (connptr) < 0) {
update_stats (STAT_BADCONN);
indicate_http_error (connptr, 408, "Timeout",
"detail",
"Server timeout waiting for the HTTP request "
"from the client.", NULL);
HC_FAIL();
goto done;
}
/*