fetch-progress
fetch-progress copied to clipboard
Incorrect progress for gzip encoded response
fetchProgress
returns percentage above 100% if the response is using content-encoding: gzip
.
It might happen with others encodings as well.
Ref: https://github.com/HighCWu/waifu2x-tfjs/issues/5#issuecomment-831715803 https://github.com/AnthumChris/fetch-progress-indicators/issues/13#issuecomment-622196688
Thanks for reporting, Will look in to it also I'll be glad if you could open a PR for this. Thanks again
hi. I can confirm the same. In my case it shows 300%. Any solutions to it ? Thanks
LE: The total
is ok, while the transfered
and percentage
are not right.
@samundrak Thanks for the reply. I would but I'm not sure what the best course of action here is. The fix in the lib above was just prioritizing the X-File-Size
header if the content is encoded. This will fix the problem in the cases the server includes this header in the response but it will persist for cases that it doesn't. I'm not familiar enough with the Steams spec to know if there have been any changes that would allow for a better solution at this point.
@samundrak any ETA when the fix will be commited ?