Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket handshake fails in Chrome due to missing Sec-WebSocket-Protocol field #57

Open
triska opened this issue Sep 12, 2016 · 0 comments

Comments

@triska
Copy link
Member

triska commented Sep 12, 2016

Steps to reproduce:

  1. Start the echo server that is shown in the documentation of library(http/websocket), using:

    ?- http_server(http_dispatch, [port(8090)]).
    
  2. Use the following JavaScript line to establish a WebSocket connection in Chrome:

    var s = new WebSocket("ws://localhost:8090/ws", "protocolOne");
    

Chrome refuses the connection with:

Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

If possible, please add this header field to the response. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant