Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect progress for gzip encoded response #22

Open
gqgs opened this issue May 4, 2021 · 4 comments
Open

Incorrect progress for gzip encoded response #22

gqgs opened this issue May 4, 2021 · 4 comments

Comments

@gqgs
Copy link

gqgs commented May 4, 2021

fetchProgress returns percentage above 100% if the response is using content-encoding: gzip.
It might happen with others encodings as well.

Ref:
HighCWu/waifu2x-tfjs#5 (comment)
anthumchris/fetch-progress-indicators#13 (comment)

@samundrak
Copy link
Owner

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

@ibudisteanu
Copy link

ibudisteanu commented Jun 1, 2021

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.

@gqgs
Copy link
Author

gqgs commented Jun 3, 2021

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

@ibudisteanu
Copy link

@samundrak any ETA when the fix will be commited ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants