elm / http

Make HTTP requests in Elm
https://package.elm-lang.org/packages/elm/http/latest
BSD 3-Clause "New" or "Revised" License
154 stars 46 forks source link

Http.Progress not working when the content is gzipped #42

Closed pablohirafuji closed 5 years ago

pablohirafuji commented 6 years ago

If the content is not gzipped, the progress bar seems to work fine on all the browsers I have tested so far. But if the server sends it as gzip, only Firefox works¹.

This appears to be a XHR spec issue, for what I understood, chrome and others browsers does not implement tracking progress when the content is gzipped because the specs are unclear whether the value of the content-length header should be after-decoding or before-decoding.

Tests can be done in this link: https://pablohirafuji.github.io/elm-http-progress-example/

evancz commented 5 years ago

Is there any proposal of concrete changes that should be made to how this library works as a result of this underlying disagreement?

pablohirafuji commented 5 years ago

With the new elm/http and elm/file packages, there is not. I really like the new http api and the elm/file and elm/bytes packages. Just using your packages makes me a better programmer, gives me a better discernment of good and bad mental models. Yours being the standard for good, of course. I do not objectively know why, but it makes me do simpler, debuggable, coherent, non contraditory, reasonable and enjoyful codes. Thank you for being who you are!