diff --git a/lib/plug/cowboy.ex b/lib/plug/cowboy.ex index 4ed13e4..0f62b9b 100644 --- a/lib/plug/cowboy.ex +++ b/lib/plug/cowboy.ex @@ -290,7 +290,6 @@ defmodule Plug.Cowboy do socket_opts = socket_opts - |> Keyword.put_new(:next_protocols_advertised, ["h2", "http/1.1"]) |> Keyword.put_new(:alpn_preferred_protocols, ["h2", "http/1.1"]) {:ranch_ssl, :cowboy_tls, %{transport_opts | socket_opts: socket_opts}} diff --git a/test/plug/cowboy_test.exs b/test/plug/cowboy_test.exs index e5ea59c..83e0699 100644 --- a/test/plug/cowboy_test.exs +++ b/test/plug/cowboy_test.exs @@ -63,7 +63,6 @@ defmodule Plug.CowboyTest do ] = opts assert Keyword.get(socket_opts, :alpn_preferred_protocols) == ["h2", "http/1.1"] - assert Keyword.get(socket_opts, :next_protocols_advertised) == ["h2", "http/1.1"] end test "builds args for cowboy dispatch" do