Debian Codegraph @

doc/src/guide/migrating_from_2.2.asciidoc

raw
1 [appendix]
2 == Migrating from Cowboy 2.2 to 2.3
3
4 Cowboy 2.3 focused on making the Cowboy processes behave
5 properly according to OTP principles. This version is a
6 very good milestone toward that goal and most of everything
7 should now work. Release upgrades and a few details will
8 be improved in future versions.
9
10 === Features added
11
12 * Add support for all functions from the module `sys`. Note
13 that Cowboy currently does not implement the `sys` debugging
14 mechanisms as tracing is recommended instead.
15
16 * Add a `max_frame_size` option for Websocket handlers
17 to close the connection when the client attempts to
18 send a frame that's too large. It currently defaults
19 to `infinity` to avoid breaking existing code but will
20 be changed in a future version.
21
22 * Update Cowlib to 2.2.1.
23
24 * Add support for the 308 status code and a test suite
25 for RFC7538 where it is defined.
26
27 === Bugs fixed
28
29 * Ensure timeout options accept the value `infinity` as
30 documented.
31
32 * Properly reject HTTP/2 requests with an invalid content-length
33 header instead of simply crashing.
34
35 * When switching from HTTP/1.1 to Websocket or user protocols
36 all the messages in the mailbox were flushed. Only messages
37 specific to `cowboy_http` should now be flushed.
38
39 * Parsing of the x-forwarded-for header has been corrected.
40 It now supports IPv6 addresses both with and without port.
41
42 * Websocket subprotocol tokens are now parsed in a case
43 insensitive manner, according to the spec.
44
45 * Cookies without values are now allowed. For example `Cookie: foo`.
46
47 * Colons are now allowed within path segments in routes provided
48 to `cowboy_router:compile/1` as long as they are not the first
49 character of the path segment.
50
51 * The `cowboy_req:delete_resp_header/2` function will no longer
52 crash when no response header was set before calling it.
53
54 * A miscount of the output HTTP/2 flow control window has been
55 fixed. It prevented sending the response body fully to some
56 clients. The issue only affected response bodies sent as iolists.