http2: when uploading data from stdin, fix eos forwarding

When uploading data from stdin ('-T -'), and the EOS was only detected
on a 0-length read, the EOS was not forwarded to the filters. This led
HTTP/2 to hang on not forwarding this to the server.

Added test_07_14 to reproduce and verify.

Fixes #14870
Reported-by: nekopsykose on github
Closes #14877
This commit is contained in:
Stefan Eissing 2024-09-12 10:03:33 +02:00 committed by Daniel Stenberg
parent 9dc0770e2c
commit 70d3a9b6aa
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 68 additions and 18 deletions

View file

@ -1253,8 +1253,8 @@ CURLcode Curl_xfer_send(struct Curl_easy *data,
else if(!result && *pnwritten)
data->info.request_size += *pnwritten;
DEBUGF(infof(data, "Curl_xfer_send(len=%zu) -> %d, %zu",
blen, result, *pnwritten));
DEBUGF(infof(data, "Curl_xfer_send(len=%zu, eos=%d) -> %d, %zu",
blen, eos, result, *pnwritten));
return result;
}