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

Sec-WebSocket-Key Error #12

Open
punkrockid opened this issue May 7, 2013 · 2 comments
Open

Sec-WebSocket-Key Error #12

punkrockid opened this issue May 7, 2013 · 2 comments

Comments

@punkrockid
Copy link

While using your library I've never been able to get a successful response from the echo.websocket.org server. So, I added a Serial.print on the handshake section to debug the error and I got the following:

HTTP/1.1 400 Bad Request
Server: Kaazing Gateway
Date: Tue, 07 May 2013 05:11:21 GMT
Access-Control-Allow-Origin: ArduinoWebSocketClient
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: content-type
Access-Control-Allow-Headers: authorization
Access-Control-Allow-Headers: x-websocket-extensions
Access-Control-Allow-Headers: x-websocket-version
Access-Control-Allow-Headers: x-websocket-protocol
Content-Type: text/html
Content-Length: 63
Connection: Keep-Alive

Then, I tested it with a Node websocket server I created and got the following:

HTTP/1.1 400 Bad Request
Connection: close
X-WebSocket-Reject-Reason: Client must provide a value for Sec-WebSocket-Key.

Am I doing something wrong or does the library need to be updated?

Regards and Thanks a lot!!

@spiritinlife
Copy link

As specified in the RFC6455( https://tools.ietf.org/html/rfc6455#section-1.2) you need to have a Sec-WebSocket-Key in the headers of your upgrade request.
This library does not include such a header , i am currently working to fix that . If i succeed i will make a pull request.

@spiritinlife
Copy link

This guy has a working solution https://github.com/hadleyrich/ArduinoWebsocketClient

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

2 participants