title: Websocket error: ERR_INVALID_HTTP_RESPONSE
body: <p>So I have set up a <b>websocket</b> server with PHP, Ratchet.<br>
  I have did few tests with <b>telnet</b> and <b>ncat</b> and they <b>worked</b> fine.<br>
  <br>But, when I try to connect to the server with <b>javascript</b> it doesn't work.<br>I get that error:</p>
  
  <pre><code>WebSocket connection to 'ws://127.0.0.1:8080/' failed: Error during WebSocket handshake: net::ERR_INVALID_HTTP_RESPONSE
  </code></pre>
  
  <p>(yes, IP and port is correct, and I can connect it via telnet and ncat)<br>
  What could be problem? Thanks</p>