diff --git a/CHANGELOG.md b/CHANGELOG.md index fc5188d..578198a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## v2.6.0 + +### Enhancements + + * Support websocket upgrades + * Require Plug v1.14+ and Elixir v1.10+ + ## v2.5.2 ### Enhancements diff --git a/config/config.exs b/config/config.exs index d51769e..0f109c5 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,6 +1,6 @@ import Config -if config_env() == :test do +if Mix.env() == :test do config :plug, :statuses, %{ 418 => "Totally not a teapot", 998 => "Not An RFC Status Code" diff --git a/lib/plug/cowboy/handler.ex b/lib/plug/cowboy/handler.ex index 2dd1061..e5985eb 100644 --- a/lib/plug/cowboy/handler.ex +++ b/lib/plug/cowboy/handler.ex @@ -31,7 +31,7 @@ defmodule Plug.Cowboy.Handler do end def upgrade(req, env, __MODULE__, {handler, state}, opts) do - :cowboy_websocket.upgrade(req, env, handler, state, opts) + :cowboy_websocket.upgrade(req, env, handler.module_info(:module), state, opts) end defp copy_resp_headers(%Plug.Conn{} = conn, req) do diff --git a/mix.exs b/mix.exs index 2de97d3..89a6d75 100644 --- a/mix.exs +++ b/mix.exs @@ -2,7 +2,7 @@ defmodule Plug.Cowboy.MixProject do use Mix.Project @source_url "https://github.com/elixir-plug/plug_cowboy" - @version "2.6.0-dev" + @version "2.6.0" @description "A Plug adapter for Cowboy" def project do