DataRequest: More consistent progress report
Trigger DownloadProgress after DataReceived, similar to how other BUrlRequest classes behave. Change-Id: I4858c3736b1b1ebec55af9903dbfd4b976a77df3 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3073 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -118,9 +118,10 @@ BDataRequest::_ProtocolLoop()
|
|||||||
|
|
||||||
if (fListener != NULL) {
|
if (fListener != NULL) {
|
||||||
fListener->HeadersReceived(this, fResult);
|
fListener->HeadersReceived(this, fResult);
|
||||||
fListener->DownloadProgress(this, length, length);
|
if (length > 0) {
|
||||||
if (length > 0)
|
|
||||||
fListener->DataReceived(this, payload, 0, length);
|
fListener->DataReceived(this, payload, 0, length);
|
||||||
|
fListener->DownloadProgress(this, length, length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isBase64)
|
if (isBase64)
|
||||||
|
|||||||
Reference in New Issue
Block a user