lua-resty-websocket
lua-resty-websocket copied to clipboard
bad RSV1, RSV2, or RSV3 bits
When I GET the address that call lua script with client example I receive error: "failed to receive the frame: bad RSV1, RSV2, or RSV3 bits"
nginx.conf:
server{ listen 80; server_name comet.io; location /cli{ default_type 'text/html'; content_by_lua_file 'path/to/lua/ws_client.lua'; } }
ws_client.lua: <copy-paste from https://github.com/openresty/lua-resty-websocket#restywebsocketclient>
curl http://comet.io/cli failed to receive the frame: bad RSV1, RSV2, or RSV3 bits
There is my ws server config:
server {
listen 8020;
server_name comet.io;
location /ser {
proxy_pass http://comet.io:8010;
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
proxy_set_header sec-websocket-key tfyt7uhy08yuh08909uoij;
proxy_set_header sec-websocket-version 13;
}
}
server {
listen 8010;
server_name comet.io;
location /ser {
default_type 'text/html';
content_by_lua_file '/root/ws_server.lua';
}
}
@sdmrnv Have you find a solution to fix this problem, I have same problem when I tried to connect to wss://ws.kraken.com/book