migrating_from_2.2.asciidoc 2.0 KB

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