mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-13 20:00:24 +00:00
Cowboy 2.13.0
This commit is contained in:
parent
9430bf99ea
commit
9facbfd121
5 changed files with 123 additions and 6 deletions
6
Makefile
6
Makefile
|
@ -2,7 +2,7 @@
|
|||
|
||||
PROJECT = cowboy
|
||||
PROJECT_DESCRIPTION = Small, fast, modern HTTP server.
|
||||
PROJECT_VERSION = 2.12.0
|
||||
PROJECT_VERSION = 2.13.0
|
||||
PROJECT_REGISTERED = cowboy_clock
|
||||
|
||||
# Options.
|
||||
|
@ -44,8 +44,8 @@ define HEX_TARBALL_EXTRA_METADATA
|
|||
#{
|
||||
licenses => [<<"ISC">>],
|
||||
links => #{
|
||||
<<"User guide">> => <<"https://ninenines.eu/docs/en/cowboy/2.12/guide/">>,
|
||||
<<"Function reference">> => <<"https://ninenines.eu/docs/en/cowboy/2.12/manual/">>,
|
||||
<<"User guide">> => <<"https://ninenines.eu/docs/en/cowboy/2.13/guide/">>,
|
||||
<<"Function reference">> => <<"https://ninenines.eu/docs/en/cowboy/2.13/manual/">>,
|
||||
<<"GitHub">> => <<"https://github.com/ninenines/cowboy">>,
|
||||
<<"Sponsor">> => <<"https://github.com/sponsors/essen">>
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ Cowboy is *clean* and *well tested* Erlang code.
|
|||
|
||||
== Online documentation
|
||||
|
||||
* https://ninenines.eu/docs/en/cowboy/2.12/guide[User guide]
|
||||
* https://ninenines.eu/docs/en/cowboy/2.12/manual[Function reference]
|
||||
* https://ninenines.eu/docs/en/cowboy/2.13/guide[User guide]
|
||||
* https://ninenines.eu/docs/en/cowboy/2.13/manual[Function reference]
|
||||
|
||||
== Offline documentation
|
||||
|
||||
|
|
|
@ -75,6 +75,8 @@ include::performance.asciidoc[Performance]
|
|||
|
||||
= Additional information
|
||||
|
||||
include::migrating_from_2.12.asciidoc[Migrating from Cowboy 2.12 to 2.13]
|
||||
|
||||
include::migrating_from_2.11.asciidoc[Migrating from Cowboy 2.11 to 2.12]
|
||||
|
||||
include::migrating_from_2.10.asciidoc[Migrating from Cowboy 2.10 to 2.11]
|
||||
|
|
115
doc/src/guide/migrating_from_2.12.asciidoc
Normal file
115
doc/src/guide/migrating_from_2.12.asciidoc
Normal file
|
@ -0,0 +1,115 @@
|
|||
[appendix]
|
||||
== Migrating from Cowboy 2.12 to 2.13
|
||||
|
||||
Cowboy 2.13 focuses on improving the performance of
|
||||
Websocket, as well as the HTTP protocols. It also
|
||||
contains a variety of new features and bug fixes.
|
||||
In addition, Cowboy 2.13 is the first Cowboy version
|
||||
that contains the experimental HTTP/3 support.
|
||||
|
||||
Cowboy 2.13 requires Erlang/OTP 24.0 or greater.
|
||||
|
||||
=== Features added
|
||||
|
||||
* The option `dynamic_buffer` has been added. When
|
||||
enabled, Cowboy will dynamically change the
|
||||
`buffer` socket option based on how much data
|
||||
it receives. It will start at 1024 bytes and
|
||||
go up to 131072 bytes by default. This applies
|
||||
to HTTP/1.1, HTTP/2 and Websocket. The performance
|
||||
gains are very important depending on the scenario.
|
||||
|
||||
* HTTP/1.1 and HTTP/2 now accept the `hibernate`
|
||||
option. When set the connection process will
|
||||
automatically hibernate to reduce memory usage
|
||||
at a small performance cost.
|
||||
|
||||
* The `protocols` and `alpn_default_protocol` protocol
|
||||
options have been added to control exactly which
|
||||
HTTP protocols are allowed over clear and TLS listeners.
|
||||
|
||||
* The Websocket `max_frame_size` option can now be
|
||||
set dynamically via the `set_options` command.
|
||||
This allows configuring a smaller max size and
|
||||
increase it after authentication or other checks.
|
||||
|
||||
* `cowboy_req:set_resp_headers` now accept lists of
|
||||
headers. This can be used to simplify passing
|
||||
headers coming from client applications such as
|
||||
Gun. Note that the set-cookie header cannot be
|
||||
provided using this function.
|
||||
|
||||
* `cowboy_rest` now always sets the allow header.
|
||||
|
||||
* Update Ranch to 1.8.1.
|
||||
|
||||
* Update Cowlib to 2.14.0.
|
||||
|
||||
* When using Hex.pm, version check requirements will
|
||||
now be relaxed. Cowboy will accept any Ranch version
|
||||
from 1.8.0 to 2.2.0 as well as future 2.x versions.
|
||||
Similarly, any Cowlib 2.x version from 2.14.0 will
|
||||
be accepted.
|
||||
|
||||
=== Experimental features added
|
||||
|
||||
* Experimental support for HTTP/3 has been added,
|
||||
including Websocket over HTTP/3. HTTP/3 support
|
||||
is disabled by default; to enable, the environment
|
||||
variable COWBOY_QUICER must be set at compile-time.
|
||||
|
||||
=== Features deprecated
|
||||
|
||||
* The `inactivity_timeout` option is now deprecated
|
||||
for all protocols. It is de facto ignored when
|
||||
`hibernate` is enabled.
|
||||
|
||||
=== Optimisation-related changes
|
||||
|
||||
* The behavior of the `idle_timeout` timer has been
|
||||
changed for HTTP/2 and Websocket. Cowboy used to
|
||||
reset the timer on every data packet received from
|
||||
the socket. Now Cowboy will check periodically
|
||||
whether new data was received in the interval.
|
||||
|
||||
* URI and query string hex encoding and decoding has
|
||||
been optimised.
|
||||
|
||||
* Websocket UTF-8 validation of text frames has been
|
||||
optimised.
|
||||
|
||||
* Websocket unmasking has been optimised.
|
||||
|
||||
=== Bugs fixed
|
||||
|
||||
* HTTP/1.1 upgrade to HTTP/2 is now disabled over TLS,
|
||||
as HTTP/2 over TLS must be negotiated via ALPN.
|
||||
|
||||
* `cowboy_req:filter_cookies` could miss valid cookies.
|
||||
It has been corrected.
|
||||
|
||||
* HTTP/1.1 could get to a state where it would stop
|
||||
receiving data from the socket, or buffer the data
|
||||
without processing it, and the connection eventually
|
||||
time out. This has been fixed.
|
||||
|
||||
* Websocket did not compress zero-length frames properly.
|
||||
This resulted in decompression errors in the client.
|
||||
This has been corrected.
|
||||
|
||||
* Websocket compression will now be disabled when only
|
||||
the server sets `client_max_window_bits`, as otherwise
|
||||
decompression errors will occur.
|
||||
|
||||
* Websocket will now apply `max_frame_size` both to
|
||||
compressed frames as well as the uncompressed payload.
|
||||
Cowboy will stop decompressing when the limit is
|
||||
reached.
|
||||
|
||||
* Cowboy now properly handles exits of request processes
|
||||
that occurred externally (e.g. via `exit/2`).
|
||||
|
||||
* Invalid return values from `content_types_provided`
|
||||
could result in an atom sent to the socket, leading
|
||||
to a cryptic error message. The invalid value will
|
||||
now result in a better error message.
|
|
@ -1,6 +1,6 @@
|
|||
{application, 'cowboy', [
|
||||
{description, "Small, fast, modern HTTP server."},
|
||||
{vsn, "2.12.0"},
|
||||
{vsn, "2.13.0"},
|
||||
{modules, ['cowboy','cowboy_app','cowboy_bstr','cowboy_children','cowboy_clear','cowboy_clock','cowboy_compress_h','cowboy_constraints','cowboy_decompress_h','cowboy_handler','cowboy_http','cowboy_http2','cowboy_http3','cowboy_loop','cowboy_metrics_h','cowboy_middleware','cowboy_quicer','cowboy_req','cowboy_rest','cowboy_router','cowboy_static','cowboy_stream','cowboy_stream_h','cowboy_sub_protocol','cowboy_sup','cowboy_tls','cowboy_tracer_h','cowboy_websocket']},
|
||||
{registered, [cowboy_sup,cowboy_clock]},
|
||||
{applications, [kernel,stdlib,crypto,cowlib,ranch]},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue