dream-encoding
dream-encoding copied to clipboard
Encoding primitives for Dream applications.
This allow the user of this handler to enable/disable the logging independently of the rest of the application Logging at debug level means in the default Dream configuration no logging...
e.g.: https://github.com/tmattio/dream-encoding/blob/dde420426ba98da2bc7d26b0d67c3f0f2eb7b7ab/lib/dream_encoding.ml#L194-L195 This appears to read the entire body into memory, and then compress it. I assume (perhaps wrongly) that the underlying compression algorithms support streaming, and it seems like...
I was browsing MDN and learnt they suggest adding a `Vary` header (with `Accept-Encoding`) to aid caching. https://developer.mozilla.org/en-US/docs/Web/HTTP/Compression#end-to-end_compression
Responses for images or videos or other files that are typically compressed already will not benefit from http layer compression. As such it would be beneficial to check the `content-type`...
Hi! Thanks for this project. I discovered a footgun which is possibly more to blame dream than dream-encoding. The case is when you use an error handler the suggested response...
Addresses #4
When I invoke `curl --compressed ...` it sets the header `Accept-Encoding: deflate, gzip, br, zstd`. Then dream with dream-encoding responds with `Content-Encoding: deflate`. This is despite `gzip` also being requested...