Debian Codegraph @

doc/src/guide/migrating_from_2.8.asciidoc

raw
1 [appendix]
2 == Migrating from Cowboy 2.8 to 2.9
3
4 Cowboy 2.9 implements graceful shutdown of connection
5 processes for both HTTP/1.1 and HTTP/2 connections.
6
7 Cowboy 2.9 is the first release to support the much
8 awaited Erlang/OTP 24 out of the box. While users that
9 were using Ranch 2.0 already were ready for OTP 24,
10 the Ranch version used by Cowboy out of the box was
11 not compatible and had to be updated.
12
13 Cowboy 2.9 also contains a small number of tweaks
14 and bug fixes.
15
16 Cowboy 2.9 requires Erlang/OTP 22.0 or greater.
17
18 === Features added
19
20 * Cowboy will now gracefully shutdown HTTP/1.1 and HTTP/2
21 connections when the supervisor asks the connection
22 process to exit, or when `sys:terminate/2,3` is used.
23 Two new configuration options were added for HTTP/2
24 to determine the timeouts for the graceful shutdown
25 steps.
26
27 * REST handler `AcceptCallback` can now return `{created, URI}`
28 or `{see_other, URI}` to determine what response status code
29 should be sent (typically to differentiate between a new
30 resource and an update). The return value `{true, URI}` is
31 now deprecated.
32
33 * Update Ranch to 1.8.0.
34
35 * Update Cowlib to 2.11.0.
36
37 === Bugs fixed
38
39 * Fix concurrent body streaming getting stuck with HTTP/2.
40 The alarm could get into blocking state indefinitely
41 when two or more request processes were streaming bodies.
42
43 * Fix HTTP/2 rate limiting using the wrong default values
44 in some cases.
45
46 * Don't produce an error report when the request process
47 exited normally (`normal` or `shutdown` exit reasons).
48
49 * Fix `cowboy_tracer_h` to support trace messages without
50 timestamps.