mirror of
https://github.com/moparisthebest/curl
synced 2025-03-02 10:21:46 -05:00
c-hyper: fix the uploaded field in progress callbacks
Makes test 578 work Closes #7209
This commit is contained in:
parent
cd5ca9bb38
commit
372361f6ca
@ -562,6 +562,10 @@ static int uploadpostfields(void *userdata, hyper_context *ctx,
|
||||
*chunk = copy;
|
||||
else
|
||||
return HYPER_POLL_ERROR;
|
||||
/* increasing the writebytecount here is a little premature but we
|
||||
don't know exactly when the body is sent*/
|
||||
data->req.writebytecount += (size_t)data->req.p.http->postsize;
|
||||
Curl_pgrsSetUploadCounter(data, data->req.writebytecount);
|
||||
data->req.upload_done = TRUE;
|
||||
}
|
||||
return HYPER_POLL_READY;
|
||||
@ -586,6 +590,10 @@ static int uploadstreamed(void *userdata, hyper_context *ctx,
|
||||
*chunk = copy;
|
||||
else
|
||||
return HYPER_POLL_ERROR;
|
||||
/* increasing the writebytecount here is a little premature but we
|
||||
don't know exactly when the body is sent*/
|
||||
data->req.writebytecount += fillcount;
|
||||
Curl_pgrsSetUploadCounter(data, fillcount);
|
||||
}
|
||||
return HYPER_POLL_READY;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user