mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
hyper: fix a progress upload counter bug
`Curl_pgrsSetUploadCounter` should be a passed a total count, not an increment. This changes the failing diff for test 579 with hyper from this: ``` Progress callback called with UL 0 out of 0[LF] -Progress callback called with UL 8 out of 0[LF] -Progress callback called with UL 16 out of 0[LF] -Progress callback called with UL 26 out of 0[LF] -Progress callback called with UL 61 out of 0[LF] -Progress callback called with UL 66 out of 0[LF] +Progress callback called with UL 29 out of 0[LF] ``` to this: ``` Progress callback called with UL 0 out of 0[LF] -Progress callback called with UL 8 out of 0[LF] -Progress callback called with UL 16 out of 0[LF] -Progress callback called with UL 26 out of 0[LF] -Progress callback called with UL 61 out of 0[LF] -Progress callback called with UL 66 out of 0[LF] +Progress callback called with UL 40 out of 0[LF] ``` Presumably a step in the right direction. Closes #11780
This commit is contained in:
parent
b8dabfb1e1
commit
73f4ef584f
@ -771,7 +771,7 @@ static int uploadstreamed(void *userdata, hyper_context *ctx,
|
||||
/* 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);
|
||||
Curl_pgrsSetUploadCounter(data, data->req.writebytecount);
|
||||
}
|
||||
return HYPER_POLL_READY;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user