Browse Source

Tentatively update Cowboy to 2.3.0

Loïc Hoguin 7 years ago
parent
commit
22e6bc3d17

+ 1 - 1
Makefile

@@ -2,7 +2,7 @@
 
 
 PROJECT = cowboy
 PROJECT = cowboy
 PROJECT_DESCRIPTION = Small, fast, modern HTTP server.
 PROJECT_DESCRIPTION = Small, fast, modern HTTP server.
-PROJECT_VERSION = 2.2.2
+PROJECT_VERSION = 2.3.0
 PROJECT_REGISTERED = cowboy_clock
 PROJECT_REGISTERED = cowboy_clock
 
 
 # Options.
 # Options.

+ 1 - 1
doc/src/guide/book.asciidoc

@@ -73,7 +73,7 @@ include::middlewares.asciidoc[Middlewares]
 
 
 = Additional information
 = Additional information
 
 
-include::migrating_from_2.2.asciidoc[Changes since Cowboy 2.2]
+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]
 include::migrating_from_2.1.asciidoc[Migrating from Cowboy 2.1 to 2.2]
 
 

+ 1 - 1
doc/src/guide/getting_started.asciidoc

@@ -69,7 +69,7 @@ fetch and compile Cowboy:
 PROJECT = hello_erlang
 PROJECT = hello_erlang
 
 
 DEPS = cowboy
 DEPS = cowboy
-dep_cowboy_commit = 2.2.2
+dep_cowboy_commit = 2.3.0
 
 
 DEP_PLUGINS = cowboy
 DEP_PLUGINS = cowboy
 
 

+ 41 - 8
doc/src/guide/migrating_from_2.2.asciidoc

@@ -1,15 +1,48 @@
 [appendix]
 [appendix]
-== Changes since Cowboy 2.2
+== Migrating from Cowboy 2.2 to 2.3
 
 
-The following patch versions were released since Cowboy 2.2:
+Cowboy 2.3 focused on making the Cowboy processes behave
+properly according to OTP principles. This version is a
+very good milestone toward that goal and most of everything
+should now work. Release upgrades and a few details will
+be improved in future versions.
 
 
-=== Cowboy 2.2.2
+=== Features added
 
 
-* While fixing the miscount in the previous patch release an
-  issue was introduced where HTTP/2 bodies could be sent out
-  of orders when using iolists. This has been corrected.
+* Add support for all functions from the module `sys`. Note
+  that Cowboy currently does not implement the `sys` debugging
+  mechanisms as tracing is recommended instead.
 
 
-=== Cowboy 2.2.1
+* Add a `max_frame_size` option for Websocket handlers
+  to close the connection when the client attempts to
+  send a frame that's too large. It currently defaults
+  to `infinity` to avoid breaking existing code but will
+  be changed in a future version.
+
+* Update Cowlib to 2.2.1.
+
+* Add support for the 308 status code and a test suite
+  for RFC7538 where it is defined.
+
+=== Bugs fixed
+
+* Ensure timeout options accept the value `infinity` as
+  documented.
+
+* Properly reject HTTP/2 requests with an invalid content-length
+  header instead of simply crashing.
+
+* When switching from HTTP/1.1 to Websocket or user protocols
+  all the messages in the mailbox were flushed. Only messages
+  specific to `cowboy_http` should now be flushed.
+
+* Parsing of the x-forwarded-for header has been corrected.
+  It now supports IPv6 addresses both with and without port.
+
+* Websocket subprotocol tokens are now parsed in a case
+  insensitive manner, according to the spec.
+
+* Cookies without values are now allowed. For example `Cookie: foo`.
 
 
 * Colons are now allowed within path segments in routes provided
 * Colons are now allowed within path segments in routes provided
   to `cowboy_router:compile/1` as long as they are not the first
   to `cowboy_router:compile/1` as long as they are not the first
@@ -19,5 +52,5 @@ The following patch versions were released since Cowboy 2.2:
   crash when no response header was set before calling it.
   crash when no response header was set before calling it.
 
 
 * A miscount of the output HTTP/2 flow control window has been
 * A miscount of the output HTTP/2 flow control window has been
-  fixed. It prevented sending the response body fully with some
+  fixed. It prevented sending the response body fully to some
   clients. The issue only affected response bodies sent as iolists.
   clients. The issue only affected response bodies sent as iolists.

+ 1 - 1
ebin/cowboy.app

@@ -1,6 +1,6 @@
 {application, 'cowboy', [
 {application, 'cowboy', [
 	{description, "Small, fast, modern HTTP server."},
 	{description, "Small, fast, modern HTTP server."},
-	{vsn, "2.2.2"},
+	{vsn, "2.3.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']},
 	{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]},
 	{registered, [cowboy_sup,cowboy_clock]},
 	{applications, [kernel,stdlib,crypto,cowlib,ranch]},
 	{applications, [kernel,stdlib,crypto,cowlib,ranch]},