Age | Commit message (Collapse) | Author |
|
It allows overriding the idle_timeout option only for now.
|
|
|
|
This allows requests that expect to run longer to do so
without impacting the configuration of other requests.
|
|
The first two options to benefit from this are the
cowboy_compress_h options.
|
|
Also changes the behavior to disable buffering by default, so
that the default works in all cases, including server-sent events.
|
|
It's OK to send it when set explicitly, as it can be set
to what the representation's size would have been.
|
|
|
|
|
|
|
|
|
|
It allows to temporarily disable Websocket compression
when it was negotiated. It's ignored otherwise. This
can be used as fine-grained control when some frames
do not compress well.
|
|
They allow the server to configure what it is willing to accept
for both the negotiated configuration (takeover and window bits)
and the other zlib options (level, mem_level and strategy).
This can be used to reduce the memory and/or CPU footprint of
the compressed data, which comes with a cost in compression ratio.
|
|
|
|
And fix this case when multiple ranges are requested.
|
|
Returning the atom auto instead of a callback informs Cowboy
that it needs to handle range requests automatically. This
changes the behavior so that the ProvideCallback function
is called and then Cowboy splits the data on its own and
sends the response without any other user involvement other
than defining the ranges_provided/2 callback.
This is a quick and dirty way to add range request support
to resources, and will be good enough for many cases including
for cowboy_static as it also works when the normal response
body is a sendfile tuple.
|
|
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.
|
|
This is currently undocumented but is planned to be documented
in the next version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix cases where the q-value is 0 and where a wildcard
was sent in the accept-charset header.
Also don't send a charset in the content-type of the
response if the media type is not text.
Thanks to Philip Witty for help figuring this out.
|
|
Thanks to Philip Witty for help figuring this out.
|
|
|
|
Currently the compression threshold is set to 300 and hardcoded in the
codebase. There are cases where it make sense to allow this to be
configured, for instance when you want to enforce all responses to be
compressed regarldess of their size.
|
|
|
|
|
|
|
|
|
|
Depend on Ranch master for now since it isn't in any release yet.
|
|
The processes go down slower now so that caused intermittent
issues.
|
|
|
|
The new module is a merge of the Cowboy and Gun HTTP/2
state machines. Using a common code will help future
developments rather than duplicating the work.
A notable change is in how streams are terminated
when the handler stops before the body is sent. The
cowboy_stream:terminate function is now called only
after the body has been sent fully (or the stream
is reset in-between), not when the stop command is
returned. This will most likely have an impact on
metrics but will be closer to reality.
I had to comment a broken test in rfc7231_SUITE that
was cheating, cheating is no longer possible.
This depends on Cowlib master for the time being. A
new Cowlib version will be released once both Cowboy
and Gun are ported to use cow_http2_machine and I'm
satisfied with it.
|
|
|
|
We always compress when streaming the body back to the client
regardless of the size actually streamed.
|
|
It has changed in Gun 1.2.
|
|
|
|
This command is currently not documented. It allows disabling
the reading of incoming data from the socket, and can be used
as a poor man's flow control.
|
|
|
|
If there's an error it makes sense to have feedback as early
as possible.
|
|
This feature is currently experimental. It will become the
preferred way to use Websocket handlers once it becomes
documented.
A commands-based interface enables adding commands without
having to change the interface much. It mirrors the interface
of stream handlers or gen_statem. It will enable adding
commands that have been needed for some time but were not
implemented for fear of making the interface too complex.
|
|
|
|
|
|
Make sure the test fails when the code is incorrect.
|
|
|
|
when settings_timeout is infinity
|
|
|
|
|