Revert "cf_socket_recv: don't count reading zero bytes as first byte"

This reverts commit df60e8fe70.

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
This commit is contained in:
Daniel Stenberg 2025-09-22 09:10:39 +02:00
parent 7cb5e39f36
commit 66c7e92ae4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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;
}