Update websocket.lua

根据Issue(https://github.com/cloudwu/skynet/issues/1163#issue-587403602)提出修改建议
This commit is contained in:
Fanrncho
2020-03-27 11:35:07 +08:00
committed by 云风
parent f6b8eba01e
commit 892189ff90

View File

@@ -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