mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
lib: send eos flag
Adds a `bool eos` flag to send methods to indicate that the data is the last chunk the invovled transfer wants to send to the server. This will help protocol filters like HTTP/2 and 3 to forward the stream's EOF flag and also allow to EAGAIN such calls when buffers are not yet fully flushed. Closes #14220
This commit is contained in:
parent
c98f6fcde7
commit
be93299f10
41 changed files with 200 additions and 166 deletions
|
|
@ -187,7 +187,7 @@ static CURLcode gopher_do(struct Curl_easy *data, bool *done)
|
|||
if(strlen(sel) < 1)
|
||||
break;
|
||||
|
||||
result = Curl_xfer_send(data, sel, k, &amount);
|
||||
result = Curl_xfer_send(data, sel, k, FALSE, &amount);
|
||||
if(!result) { /* Which may not have written it all! */
|
||||
result = Curl_client_write(data, CLIENTWRITE_HEADER, sel, amount);
|
||||
if(result)
|
||||
|
|
@ -229,7 +229,7 @@ static CURLcode gopher_do(struct Curl_easy *data, bool *done)
|
|||
free(sel_org);
|
||||
|
||||
if(!result)
|
||||
result = Curl_xfer_send(data, "\r\n", 2, &amount);
|
||||
result = Curl_xfer_send(data, "\r\n", 2, FALSE, &amount);
|
||||
if(result) {
|
||||
failf(data, "Failed sending Gopher request");
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue