diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gun.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gun.erl b/src/gun.erl index 047aa18..bd4ce3d 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -920,7 +920,7 @@ ws_upgrade(ServerPid, Path) -> -spec ws_upgrade(pid(), iodata(), req_headers()) -> stream_ref(). ws_upgrade(ServerPid, Path, Headers) -> StreamRef = make_ref(), - gen_statem:cast(ServerPid, {ws_upgrade, self(), StreamRef, Path, Headers}), + gen_statem:cast(ServerPid, {ws_upgrade, self(), StreamRef, Path, normalize_headers(Headers)}), StreamRef. -spec ws_upgrade(pid(), iodata(), req_headers(), ws_opts()) -> stream_ref(). @@ -929,7 +929,7 @@ ws_upgrade(ServerPid, Path, Headers, Opts) -> StreamRef = make_ref(), ReplyTo = maps:get(reply_to, Opts, self()), %% @todo Also accept tunnel option. - gen_statem:cast(ServerPid, {ws_upgrade, ReplyTo, StreamRef, Path, Headers, Opts}), + gen_statem:cast(ServerPid, {ws_upgrade, ReplyTo, StreamRef, Path, normalize_headers(Headers), Opts}), StreamRef. %% @todo ws_send/2 will need to be deprecated in favor of a variant with StreamRef. |