aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2025-02-17 14:46:20 +0100
committerLoïc Hoguin <[email protected]>2025-02-17 14:46:20 +0100
commit9facbfd121f4298d0269e01c8bd9d8d42c639d29 (patch)
tree8ff9f1f16b3c00e1dcdc82b1306f22a58af9192f
parent9430bf99ea2cc9c2c3ee06321c77433abb521833 (diff)
downloadcowboy-9facbfd121f4298d0269e01c8bd9d8d42c639d29.tar.gz
cowboy-9facbfd121f4298d0269e01c8bd9d8d42c639d29.tar.bz2
cowboy-9facbfd121f4298d0269e01c8bd9d8d42c639d29.zip
Cowboy 2.13.0
-rw-r--r--Makefile6
-rw-r--r--README.asciidoc4
-rw-r--r--doc/src/guide/book.asciidoc2
-rw-r--r--doc/src/guide/migrating_from_2.12.asciidoc115
-rw-r--r--ebin/cowboy.app2
5 files changed, 123 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index bb72978..bbcad98 100644
--- a/Makefile
+++ b/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">>
}
diff --git a/README.asciidoc b/README.asciidoc
index afd1fdd..5721a7b 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -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
diff --git a/doc/src/guide/book.asciidoc b/doc/src/guide/book.asciidoc
index cf8c943..58eda34 100644
--- a/doc/src/guide/book.asciidoc
+++ b/doc/src/guide/book.asciidoc
@@ -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]
diff --git a/doc/src/guide/migrating_from_2.12.asciidoc b/doc/src/guide/migrating_from_2.12.asciidoc
new file mode 100644
index 0000000..d058db3
--- /dev/null
+++ b/doc/src/guide/migrating_from_2.12.asciidoc
@@ -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.
diff --git a/ebin/cowboy.app b/ebin/cowboy.app
index b5932d9..91569c7 100644
--- a/ebin/cowboy.app
+++ b/ebin/cowboy.app
@@ -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]},