I have a Ruby server using em-websocket for websockets.
From the browser, I'm using the following code to connect:
var ws = new WebSocket('ws://' + window.location.host);
ws.onopen = function() { alert('websocket opened'); };
I know this is hitting the server because I see the server produce the following error:
EventMachine::WebSocket::HandshakeError - Connection and Upgrade headers required:
How can I ensure these headers are being sent by the client? I'm just using the standard browser websocket API.
Not sure if it changes anything that I'm running on Nitrous IO and I am binding the server to "0.0.0.0"