What is Sec-WebSocket-Key for?

后端 未结 5 2157
隐瞒了意图╮
隐瞒了意图╮ 2021-02-01 01:32

In section 1.3 \"Opening Handshake\" of draft-ietf-hybi-thewebsocketprotocol-17, it describes Sec-WebSocket-Key as follows:

To prove that the

5条回答
  •  臣服心动
    2021-02-01 02:05

    What the RFC is unclear about is that the "Sec-WebSocket-Key" header from the client should be random on each request. Which means any cached result from a proxy will contain an invalid "Sec-WebSocket-Accept" reply header and thus the websocket connection will fail instead of reading cached data unintentionally.

提交回复
热议问题