--- a/src/server/util/io.c Sat Feb 21 13:12:39 2026 +0100 +++ b/src/server/util/io.c Sat Feb 21 14:40:03 2026 +0100 @@ -730,7 +730,10 @@ size_t chunk_available = st->max_read - st->read; if(chunk_available > 0) { ssize_t r = http_read_buffered(st, rbuf, rbuflen, TRUE, &perform_io); - if(r == 0) { + if(r <= 0) { + if(rd == 0) { + rd = r; + } break; } rd += r;