Cowboy 2.11 contains a variety of new features and bug fixes. Nearly all previously experimental features are now marked as stable, including Websocket over HTTP/2. Included is a fix for an HTTP/2 protocol CVE.
Cowboy 2.11 requires Erlang/OTP 24.0 or greater.
Cowboy is now using GitHub Actions for CI. The main reason for the move is to reduce costs by no longer having to self-host CI runners. The downside is that GitHub runners are less reliable and timing dependent tests are now more likely to fail.
max_cancel_stream_rate has been added
to control the rate of stream cancellation the server will
accept. By default Cowboy will accept 500 cancelled streams
every 10 seconds.
cowboy_decompress_h has been added.
It allows automatically decompressing incoming gzipped
request bodies. It includes options to protect against
zip bombs.
enable_connect_protocol option must be set
to true in order to use Websocket over HTTP/2 for the
time being.
request_body message when data
comes in. It mirrors {active, once} socket modes.
This is ideal for loop handlers and is also used
internally for HTTP/2 Websocket.
cowboy_static
and cowboy_rest. Ranged responses can be produced
either automatically (for the bytes unit) or manually.
REST flowcharts have been updated with the new callbacks
and steps related to handling ranged requests.
reset_idle_timeout_on_send
has been added. When enabled, the idle_timeout will be
reset every time Cowboy sends data to the socket.
hibernate. Timeouts behave the same as in gen_server.
generate_etag callback of REST handlers now accepts
undefined as a return value to allow conditionally
generating etags.
cowboy_compress_h options compress_threshold and
compress_buffering are no longer considered experimental.
They were de facto stable since 2.6 as they already were
documented.
cowboy:get_env/2,3 have been added.
set-cookie header without using
cowboy_req:set_resp_cookie/3,4.
max_cancel_stream_rate.
send_timeout_close will work
as expected.
max_frame_size_received. Cowboy currently uses
the protocol default but will increase its default in a
future release. Until then users are recommended to set
the option to ensure larger requests are accepted and
processed with acceptable performance.
cowboy_compress_h stream handler will no longer
attempt to compress responses that have an etag header
to avoid caching issues.
cowboy_compress_h will now always add accept-encoding
to the vary header as it indicates that responses may
be compressed.
trap_exit process flag when
HTTP/1.1 connections upgrade to Websocket.
cowboy_stream manual pages have been added.