From 7d1e86ccaef27d135c77d2c7a03a15cd957e41d6 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Mon, 2 May 2022 14:50:42 +0000 Subject: [PATCH] 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 --- src/reqs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/reqs.c b/src/reqs.c index a6289a4..50aaec6 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -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; } /*