Skip to content

Commit b6e0221

Browse files
committed
fix(websocket): ensure pong frames are properly masked in response
1 parent 248bcb9 commit b6e0221

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

WebSocket/NAVFoundation.WebSocket.axi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,8 +2066,8 @@ define_function NAVWebSocketProcessBuffer(_NAVWebSocket ws) {
20662066
}
20672067

20682068
case NAV_WEBSOCKET_OPCODE_PING: {
2069-
// Auto-respond with pong
2070-
if (NAVWebSocketBuildPongFrame(parseResult.Frame.Payload, NAV_WEBSOCKET_UNMASKED, pongFrame)) {
2069+
// Auto-respond with pong (RFC 6455 §5.3: client MUST mask all frames sent to server)
2070+
if (NAVWebSocketBuildPongFrame(parseResult.Frame.Payload, NAV_WEBSOCKET_MASKED, pongFrame)) {
20712071
NAVWebSocketSendFrame(ws.Device, pongFrame)
20722072
}
20732073
}

0 commit comments

Comments
 (0)