raunioroo
raunioroo2y ago

How to prevent std/http from gzipping and overriding Etag

It appears deno std/http applies gzip content-encoding magically sometimes depending on the type of data served. This is unexpected to me, will override manually set Etags with a weakly validated one, and it seems there is no way to disable this behaviour. Or is there? If I create a Github issue about this, should it go to deno_std or does this behaviour come from underlying http impl code in deno core?
4 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
raunioroo
raunioroo2y ago
The various http server implementations have been such moving target, flash/oak/hyper/lowlevel deno core, I've tried them all and rewrote for them all. So far the std/http seems the only one that is somewhat stable, somewhat feature-complete, not a moving target, and mostly not buggy. I would highly prefer to not rewrite yet again for another http impl variant until flash is 99% stable API-wise, feature-complete and bugfree. Sorry this turned into a rant, lol. Is just, not even sure what the vanilla method is, even. If it's flash, that's not working for various other reasons. Just hoping I could make things just work with std/http for now.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
raunioroo
raunioroo2y ago
Thank you for the input! I created an issue on deno_std: https://github.com/denoland/deno_std/issues/3231 And consider the need to fall back to the lower level "vanilla" http api, if I can't make it work with std/http
GitHub
allow disabling gzip in http · Issue #3231 · denoland/deno_std
Is your feature request related to a problem? Please describe. Apparently the std http server implementation automagically applies gzip compression for some responses. (I'm guessing for res...