From 66c7e92ae4ab824d5c838a207f742af1df6edaec Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Sep 2025 09:10:39 +0200 Subject: [PATCH] Revert "cf_socket_recv: don't count reading zero bytes as first byte" This reverts commit df60e8fe701e189e7629fd08b61950a0fb1b697a. The "first byte" checkpoint is not strictly the first byte received, but the sign of first traffic from the server, which a closed connection also is. Closes #18676 --- lib/cf-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cf-socket.c b/lib/cf-socket.c index 2f0429efea..d5add9723f 100644 --- a/lib/cf-socket.c +++ b/lib/cf-socket.c @@ -1578,7 +1578,7 @@ static CURLcode cf_socket_recv(struct Curl_cfilter *cf, struct Curl_easy *data, *pnread = (size_t)nread; CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, result, *pnread); - if(!result && !ctx->got_first_byte && nread) { + if(!result && !ctx->got_first_byte) { ctx->first_byte_at = curlx_now(); ctx->got_first_byte = TRUE; } -- 2.47.3