We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2b8d980 + 0ceafb1 commit 48c1186Copy full SHA for 48c1186
src/websocket_client.erl
@@ -122,12 +122,11 @@ ws_client_init(Handler, Protocol, Host, Port, Path, Args, Opts) ->
122
%% @doc Send http upgrade request and validate handshake response challenge
123
-spec websocket_handshake(WSReq :: websocket_req:req(), [{string(), string()}]) -> {ok, binary()} | {error, term()}.
124
websocket_handshake(WSReq, ExtraHeaders) ->
125
- [Protocol, Path, Host, Key, Transport, Socket] =
126
- websocket_req:get([protocol, path, host, key, transport, socket], WSReq),
+ [Path, Host, Key, Transport, Socket] =
+ websocket_req:get([path, host, key, transport, socket], WSReq),
127
Handshake = ["GET ", Path, " HTTP/1.1\r\n"
128
"Host: ", Host, "\r\n"
129
"Connection: Upgrade\r\n"
130
- "Origin: ", atom_to_binary(Protocol, utf8), "://", Host, "\r\n"
131
"Sec-WebSocket-Version: 13\r\n"
132
"Sec-WebSocket-Key: ", Key, "\r\n"
133
"Upgrade: websocket\r\n",
0 commit comments