mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:13:35 +03:00
c-hyper: fix multi-request mechanism
It makes test 565 run fine. Fixes #8896 Closes #10080 Assisted-by: Daniel Stenberg
This commit is contained in:
parent
fd2c9e5e83
commit
b80dae232e
2 changed files with 16 additions and 3 deletions
|
|
@ -699,6 +699,7 @@ static int uploadstreamed(void *userdata, hyper_context *ctx,
|
||||||
{
|
{
|
||||||
size_t fillcount;
|
size_t fillcount;
|
||||||
struct Curl_easy *data = (struct Curl_easy *)userdata;
|
struct Curl_easy *data = (struct Curl_easy *)userdata;
|
||||||
|
struct connectdata *conn = (struct connectdata *)data->conn;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
(void)ctx;
|
(void)ctx;
|
||||||
|
|
||||||
|
|
@ -713,7 +714,15 @@ static int uploadstreamed(void *userdata, hyper_context *ctx,
|
||||||
return HYPER_POLL_PENDING;
|
return HYPER_POLL_PENDING;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Curl_fillreadbuffer(data, data->set.upload_buffer_size, &fillcount);
|
if(data->req.upload_chunky && conn->bits.authneg) {
|
||||||
|
fillcount = 0;
|
||||||
|
data->req.upload_chunky = FALSE;
|
||||||
|
result = CURLE_OK;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result = Curl_fillreadbuffer(data, data->set.upload_buffer_size,
|
||||||
|
&fillcount);
|
||||||
|
}
|
||||||
if(result) {
|
if(result) {
|
||||||
data->state.hresult = result;
|
data->state.hresult = result;
|
||||||
return HYPER_POLL_ERROR;
|
return HYPER_POLL_ERROR;
|
||||||
|
|
@ -1166,7 +1175,12 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
|
||||||
|
|
||||||
Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"\r\n", 2);
|
Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"\r\n", 2);
|
||||||
|
|
||||||
data->req.upload_chunky = FALSE;
|
if(data->req.upload_chunky && conn->bits.authneg) {
|
||||||
|
data->req.upload_chunky = TRUE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
data->req.upload_chunky = FALSE;
|
||||||
|
}
|
||||||
sendtask = hyper_clientconn_send(client, req);
|
sendtask = hyper_clientconn_send(client, req);
|
||||||
if(!sendtask) {
|
if(!sendtask) {
|
||||||
failf(data, "hyper_clientconn_send");
|
failf(data, "hyper_clientconn_send");
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@
|
||||||
# listed below
|
# listed below
|
||||||
%if hyper
|
%if hyper
|
||||||
266
|
266
|
||||||
565
|
|
||||||
579
|
579
|
||||||
587
|
587
|
||||||
# 1021 re-added here due to flakiness
|
# 1021 re-added here due to flakiness
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue