修复websock误判问题

This commit is contained in:
xiongziliang 2018-09-29 11:08:02 +08:00
parent 944ca18f92
commit 9fdf05bed0
2 changed files with 3 additions and 4 deletions

@ -1 +1 @@
Subproject commit 4ecfcd8fa0cd500156b7de9f37cd9673778c379b
Subproject commit 05a3600db674410c7930e169046b272fd1c3cccd

View File

@ -185,11 +185,10 @@ void HttpSession::onManager() {
inline bool HttpSession::checkWebSocket(){
if(m_parser["Connection"] != "Upgrade" ||
m_parser["Upgrade"] != "websocket" ){
auto Sec_WebSocket_Key = m_parser["Sec-WebSocket-Key"];
if(Sec_WebSocket_Key.empty()){
return false;
}
auto Sec_WebSocket_Key = m_parser["Sec-WebSocket-Key"];
auto Sec_WebSocket_Accept = encodeBase64(SHA1::encode_bin(Sec_WebSocket_Key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"));
KeyValue headerOut;