From 892189ff90912f33f1e30e3f4fbf82bc02c0d720 Mon Sep 17 00:00:00 2001 From: Fanrncho <206867549@qq.com> Date: Fri, 27 Mar 2020 11:35:07 +0800 Subject: [PATCH] Update websocket.lua MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据Issue(https://github.com/cloudwu/skynet/issues/1163#issue-587403602)提出修改建议。 --- lualib/http/websocket.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/http/websocket.lua b/lualib/http/websocket.lua index 6b038744..c9b8ecd9 100755 --- a/lualib/http/websocket.lua +++ b/lualib/http/websocket.lua @@ -98,7 +98,7 @@ local function read_handshake(self) return 400, "host Required" end - if not header["connection"] or header["connection"]:lower() ~= "upgrade" then + if not header["connection"] or not header["connection"]:lower():find("upgrade", 1,true) then return 400, "Connection must Upgrade" end