From 0c6438933464387651cf32efdfeb3e41fe4540db Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 27 Sep 2018 18:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=85=B3=E9=97=ADmask?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpsSession.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Http/HttpsSession.h b/src/Http/HttpsSession.h index bad27745..140f300a 100644 --- a/src/Http/HttpsSession.h +++ b/src/Http/HttpsSession.h @@ -160,7 +160,11 @@ protected: * 接收到完整的一个webSocket数据包后回调 * @param header 数据包包头 */ - void onWebSocketDecodeComplete(const WebSocketHeader &header) override { + void onWebSocketDecodeComplete(const WebSocketHeader &header_in) override { + WebSocketHeader& header = const_cast(header_in); + auto flag = header._mask_flag; + header._mask_flag = false; + switch (header._opcode){ case WebSocketHeader::CLOSE:{ HttpSessionType::encode(header,nullptr,0); @@ -185,6 +189,7 @@ protected: break; } _remian_data.clear(); + header._mask_flag = flag; } /**