From 5d5f3f846103ae24fbebaec294bc8b0390df8c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 30 Apr 2018 15:12:09 +0200 Subject: Update Cowboy to 2.4.0 --- Makefile | 2 +- doc/src/guide/book.asciidoc | 2 + doc/src/guide/getting_started.asciidoc | 2 +- doc/src/guide/migrating_from_2.3.asciidoc | 66 +++++++++++++++++++++++++++++++ ebin/cowboy.app | 2 +- 5 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 doc/src/guide/migrating_from_2.3.asciidoc diff --git a/Makefile b/Makefile index 8476f84..b036a1b 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PROJECT = cowboy PROJECT_DESCRIPTION = Small, fast, modern HTTP server. -PROJECT_VERSION = 2.3.0 +PROJECT_VERSION = 2.4.0 PROJECT_REGISTERED = cowboy_clock # Options. diff --git a/doc/src/guide/book.asciidoc b/doc/src/guide/book.asciidoc index b3d3f75..d3f37e4 100644 --- a/doc/src/guide/book.asciidoc +++ b/doc/src/guide/book.asciidoc @@ -73,6 +73,8 @@ include::middlewares.asciidoc[Middlewares] = Additional information +include::migrating_from_2.3.asciidoc[Migrating from Cowboy 2.3 to 2.4] + include::migrating_from_2.2.asciidoc[Migrating from Cowboy 2.2 to 2.3] include::migrating_from_2.1.asciidoc[Migrating from Cowboy 2.1 to 2.2] diff --git a/doc/src/guide/getting_started.asciidoc b/doc/src/guide/getting_started.asciidoc index 2d2adb0..5ef3f13 100644 --- a/doc/src/guide/getting_started.asciidoc +++ b/doc/src/guide/getting_started.asciidoc @@ -69,7 +69,7 @@ fetch and compile Cowboy: PROJECT = hello_erlang DEPS = cowboy -dep_cowboy_commit = 2.3.0 +dep_cowboy_commit = 2.4.0 DEP_PLUGINS = cowboy diff --git a/doc/src/guide/migrating_from_2.3.asciidoc b/doc/src/guide/migrating_from_2.3.asciidoc new file mode 100644 index 0000000..6a604f9 --- /dev/null +++ b/doc/src/guide/migrating_from_2.3.asciidoc @@ -0,0 +1,66 @@ +[appendix] +== Migrating from Cowboy 2.3 to 2.4 + +Cowboy 2.4 focused on improving the HTTP/2 implementation. +All existing tests from RFC7540 and the h2spec test suite +now all pass. Numerous options have been added to control +SETTINGS and related behavior. In addition experimental +support for Websocket over HTTP/2 was added. + +=== Features added + +* Add experimental support for Websocket over HTTP/2. + You can use the `enable_connect_protocol` option to + enable. It implements the following draft: + https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01 + +* Add options `max_decode_table_size` and + `max_encode_table_size` to restrict the size of the + HPACK compression dictionary. + +* Add option `max_concurrent_streams` to restrict the + number of HTTP/2 streams that can be opened concurrently. + +* Add options `initial_connection_window_size` and + `initial_stream_window_size` to restrict the size of + the HTTP/2 request body buffers for the whole connection + and per stream, respectively. + +* Add options `max_frame_size_received` and + `max_frame_size_sent` to restrict the size of + HTTP/2 frames. + +* Add option `settings_timeout` to reject clients that + did not send a SETTINGS ack. Note that this currently + may only occur at the beginning of the connection. + +* Update Ranch to 1.5.0 + +* Update Cowlib to 2.3.0 + +=== Bugs fixed + +* Fix the END_STREAM flag for informational responses + when using HTTP/2. + +* Receive and ignore HTTP/2 request trailers if any + for HTTP/2 requests. Request trailer information will + be propagated to the user code in a future release. + +* Reject WINDOW_UPDATE frames that are sent after the + client sent an RST_STREAM. Note that Cowboy will not + keep state information about terminated streams + forever and so the behavior might differ depending + on when the stream was reset. + +* Reject streams that depend on themselves. Note that + Cowboy currently does not implement HTTP/2's priority + mechanisms so this issue was harmless. + +* Reject HTTP/2 requests where the body size is different + than the content-length value. Note that due to how Cowboy + works some requests might go through regardless, for + example when the user code does not read the request body. + +* Fix all existing test failures from RFC7540. This was + mostly incorrect test cases or intermittent failures. diff --git a/ebin/cowboy.app b/ebin/cowboy.app index ce8d51d..9916e6e 100644 --- a/ebin/cowboy.app +++ b/ebin/cowboy.app @@ -1,6 +1,6 @@ {application, 'cowboy', [ {description, "Small, fast, modern HTTP server."}, - {vsn, "2.3.0"}, + {vsn, "2.4.0"}, {modules, ['cowboy','cowboy_app','cowboy_bstr','cowboy_children','cowboy_clear','cowboy_clock','cowboy_compress_h','cowboy_constraints','cowboy_handler','cowboy_http','cowboy_http2','cowboy_iolists','cowboy_loop','cowboy_metrics_h','cowboy_middleware','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]}, -- cgit v1.2.3