mtrudel / bandit

Bandit is a pure Elixir HTTP server for Plug & WebSock applications
MIT License
1.67k stars 80 forks source link

gzip compressed requests #316

Closed saleyn closed 7 months ago

saleyn commented 7 months ago

Does Bandit support gzip compressed HTTP/1.1 requests? As far as I can tell from the code it handles compression of the response if Accept-Encoding: gzip is set, but it doesn't handle the decompression of incoming compressed payload (Content-Encoding: gzip). Am I missing something?

mtrudel commented 7 months ago

Correct. It's generally much less common to compress uploads, since negotiation requires either an assumption of server support, or negotiation via 100 response codes. As a result it didn't make the first cut of compression support in Bandit. Once the refactors in #297 et al land, we'll be in a much better position to add semantic levels things such as this, and I expect to do so.

saleyn commented 7 months ago

I have cases when HTTP clients send gzip compressed requests... Any tentative timeline on adding this feature?

mtrudel commented 7 months ago

Likely a few months out. I was hoping to land #297 et al already, but keeping up with bugfixes and miscellaneous stuff from becoming phoenix's default has taken up a ton of time lately so I'm a bit behind schedule.

mtrudel commented 7 months ago

Added to my internal planning list. Again, this is likely going to be a few months out; a bunch of other stuff such as #297 et al need to land first. I'll report back here when it lands.

mtrudel commented 7 months ago

Closing for hygiene.