<html><head></head><body>Hi,<br><br>No, that's wrong. Skips the existing error handling and breaks EAGAIN case.<br><br><div class="gmail_quote">Le 12 juin 2020 11:22:32 GMT+03:00, "Hugo Beauzée-Luyssen" <hugo@beauzee.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On Thu, Jun 11, 2020, at 5:31 PM, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le torstaina 11. kesäkuuta 2020, 13.59.29 EEST Hugo Beauzée-Luyssen a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">In case of custom handlers, the entire response is crafted by pf_fill.<br>This will in turn cause 0 bytes of headers to be sent, which is expected<br>since those headers are contained in the answer, however we will treat<br>such a case as a dead connection,<br></blockquote>I think that's a misunderstanding and a bug. Writing can return 0 on a full <br>file system. But I don't think you can get a 0 write return other than writing <br>0 bytes on a TCP socket.<br><br></blockquote><br>Hi,<br><br>If I understand correctly, you're saying that the correct fix would rather be something like<br><br>diff --git a/src/network/httpd.c b/src/network/httpd.c<br>index d4b188bad3..6170cc997d 100644<br>--- a/src/network/httpd.c<br>+++ b/src/network/httpd.c<br>@@ -1610,7 +1610,7 @@ static int httpd_ClientSend(httpd_client_t *cl)<br>     i_len = httpd_NetSend(cl, &cl->p_buffer[cl->i_buffer],<br>                            cl->i_buffer_size - cl->i_buffer);<br> <br>-    if (i_len == 0) {<br>+    if (i_len < 0) {<br>         cl->i_state = HTTPD_CLIENT_DEAD; /* connection closed */<br>         return 0;<br>     }<br><br>?<br></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>