mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:43:40 +03:00
cfilters: send flush
Since data can be held in connection filter buffers when sending gives EAGAIN, add methods to query this and perform flushing of those buffers. The transfer loop will continue sending until all upload data is processed and the connection is flushed. - add `CF_QUERY_SEND_PENDING` to query filters - add `CF_CTRL_DATA_SEND_FLUSH` to flush filters - change `Curl_req_want_send()` to query the connection if it needs flushing - use `Curl_req_want_send()` to determine the POLLOUT in the PERFORMING multi state - implement flush handling in the HTTP/2 connection filter Closes #14271
This commit is contained in:
parent
911c3166b6
commit
709a6a3965
10 changed files with 278 additions and 100 deletions
10
lib/http.c
10
lib/http.c
|
|
@ -4431,8 +4431,16 @@ static CURLcode cr_exp100_read(struct Curl_easy *data,
|
|||
|
||||
switch(ctx->state) {
|
||||
case EXP100_SENDING_REQUEST:
|
||||
if(!Curl_req_sendbuf_empty(data)) {
|
||||
/* The initial request data has not been fully sent yet. Do
|
||||
* not start the timer yet. */
|
||||
DEBUGF(infof(data, "cr_exp100_read, request not full sent yet"));
|
||||
*nread = 0;
|
||||
*eos = FALSE;
|
||||
return CURLE_OK;
|
||||
}
|
||||
/* We are now waiting for a reply from the server or
|
||||
* a timeout on our side */
|
||||
* a timeout on our side IFF the request has been fully sent. */
|
||||
DEBUGF(infof(data, "cr_exp100_read, start AWAITING_CONTINUE"));
|
||||
ctx->state = EXP100_AWAITING_CONTINUE;
|
||||
ctx->start = Curl_now();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue