httpd: Don't treat 0 bytes sent as a dead connection
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Thu, 18 Jun 2020 10:07:44 +0000 (12:07 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Mon, 22 Jun 2020 10:48:51 +0000 (12:48 +0200)
src/network/httpd.c

index d4b188b..e11c9aa 100644 (file)
@@ -1610,11 +1610,6 @@ static int httpd_ClientSend(httpd_client_t *cl)
     i_len = httpd_NetSend(cl, &cl->p_buffer[cl->i_buffer],
                            cl->i_buffer_size - cl->i_buffer);
 
-    if (i_len == 0) {
-        cl->i_state = HTTPD_CLIENT_DEAD; /* connection closed */
-        return 0;
-    }
-
     if (i_len < 0) {
 #if defined(_WIN32)
         if (WSAGetLastError() == WSAEWOULDBLOCK)