0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
Commit graph

13 commits

Author SHA1 Message Date
Loïc Hoguin
5b2f600036
Don't automatically compress when response has etag
In the cowboy_compress_h stream handler.

Otherwise this could cause issues with caching, with the
etag being the same for compressed/uncompressed content.

Users that wish to send etags AND compress will have to
do it manually for the time being.
2024-01-05 15:53:42 +01:00
Marcos Ferreira
3b85b808ae
Ignore malformed accept-encoding headers in cowboy_compress_h 2019-12-31 13:48:05 +01:00
Loïc Hoguin
5ffb4f98e0
Make cowboy_compress_h add vary: accept-encoding 2019-10-04 13:32:35 +02:00
Loïc Hoguin
3f5af49cfd
Fix compress buffering tests before OTP 20.1 2018-11-22 10:41:02 +01:00
Loïc Hoguin
36debe707a
Increase a few more timeouts to reduce intermittent failures 2018-11-20 15:05:40 +01:00
Loïc Hoguin
bed328b6c9
Use ?FUNCTION_NAME instead of ct_helper:name()
Cowboy is 19+ so it's OK to use it.
2018-11-19 09:05:34 +01:00
Loïc Hoguin
240da3f2d9
Add the set_options stream handler command
The first two options to benefit from this are the
cowboy_compress_h options.
2018-11-15 18:53:42 +01:00
Loïc Hoguin
fbfec873f6
Add a compress_buffering option to cowboy_compress_h
Also changes the behavior to disable buffering by default, so
that the default works in all cases, including server-sent events.
2018-11-15 10:11:36 +01:00
Loïc Hoguin
f9d689f9fd
Remove two unnecessary debug calls 2018-11-13 15:56:58 +01:00
Loïc Hoguin
d7b7580b39
Add sendfile support to cowboy_req:stream_body
It is now possible to stream one or more sendfile tuples.
A simple example of what can now be done would be for
example to build a tar file on the fly using the sendfile
syscall for sending the files, or to support Range requests
with more than one range with the sendfile syscall.

When using cowboy_compress_h unfortunately we have to read
the file in order to send it. More options will be added
at a later time to make sure users don't read too much
into memory. This is a new feature however so existing
code is not affected.

Also rework cowboy_http's data sending to be flatter.
2018-11-09 17:42:37 +01:00
Loïc Hoguin
cf3ab5832a
Add nowarn_export_all to all test suites 2017-11-29 16:57:10 +01:00
Loïc Hoguin
8cb125dbb7
Fix a harmless warning in tests 2017-05-23 14:10:05 +02:00
Loïc Hoguin
3e05ab8f82
Add experimental cowboy_compress_h stream handler
Currently marked as experimental because it can't be tweaked
(just enabled/disabled) and because it is not documented yet.
2017-01-22 10:50:39 +01:00