Skip to content

WebSocket connection to 'ws: 127.0.0.1:8089 websocket' failed: A server must not mask any frames that it sends to the client.

ruandao edited this page Jan 24, 2017 · 1 revision

碰到这个问题:

WebSocket connection to 'ws://127.0.0.1:8089/websocket' failed: A server must not mask any frames that it sends to the client.

但是,我并没有 mask 数据啊。。。抓包,只看到一个WebSocket Continuation 找不到我下发的数据。。。 。。。 把发送的测试数据,由"你好世界" 改为 "hello" 依旧是一个WebSocket Continuation 的数据包,但是这回可以看到下发的数据 hello了,然后报错是: WebSocket connection to 'ws://127.0.0.1:8089/websocket' failed: Invalid frame header
说明,header 写的有问题,那么之前的问题应该是因为编码有问题,然后把客户端的写成中文的,没有报错。。。现在判断问题应该是在header 写的有问题