Kitura / Kitura-WebSocket

WebSocket support for Kitura
Apache License 2.0
68 stars 29 forks source link

Fix: respond with correct reason code #67

Open Andrew-Lees11 opened 5 years ago

Andrew-Lees11 commented 5 years ago

Within the websocket protocol you are not supposed to send the reason code noReasonCodeSent. This is meant to be used internally to represent no code being sent. You then respond with a normal close to the client.

This PR changes our behavior on receiving no reason code to match the protocol.

It also sends the correct reason code to the client when we terminate them for not responding to a ping.

It also makes the service only respond to a ping if the connection is active to make autobahn test 7.1.3 pass.

Websockets with these changes have been run against autobahn and all tasts pass.

nethraravindran commented 5 years ago

LGTM :)

CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.