fetch-progress icon indicating copy to clipboard operation
fetch-progress copied to clipboard

Incorrect progress for gzip encoded response

Open gqgs opened this issue 3 years ago • 4 comments

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

gqgs avatar May 04 '21 06:05 gqgs

Thanks for reporting, Will look in to it also I'll be glad if you could open a PR for this. Thanks again

samundrak avatar May 24 '21 04:05 samundrak

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.

ibudisteanu avatar Jun 01 '21 23:06 ibudisteanu

@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.

gqgs avatar Jun 03 '21 10:06 gqgs

@samundrak any ETA when the fix will be commited ?

ibudisteanu avatar Jun 03 '21 12:06 ibudisteanu