mirror of
https://github.com/processone/ejabberd.git
synced 2024-07-06 23:22:36 +02:00
Handle all draft-hybi handshake in this same way
This commit is contained in:
parent
8dc4dd7f3b
commit
83c7da3831
|
@ -249,7 +249,7 @@ handshake({'draft-hixie', 68}, _Sock,_SocketMod, _Headers, {Path, Origin, Host,
|
|||
lists:concat([Host, integer_to_list(Port)]),
|
||||
"/",string:join(Path,"/"), "\r\n\r\n"
|
||||
];
|
||||
handshake({'draft-hybi', 8}, Sock,SocketMod, Headers, {Path, Q,Origin, Host, Port}) ->
|
||||
handshake({'draft-hybi', _}, Sock,SocketMod, Headers, {Path, Q,Origin, Host, Port}) ->
|
||||
% build data
|
||||
{_, Key} = lists:keyfind("Sec-Websocket-Key",1, Headers),
|
||||
Hash = jlib:encode_base64(binary_to_list(sha:sha1(Key++"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"))),
|
||||
|
|
Loading…
Reference in New Issue
Block a user