Skip to content

Commit

Permalink
修复一个ws日志输出的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CandyMi committed Apr 4, 2019
1 parent 09bf80c commit 1ce2d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lualib/protocol/http.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ local function Switch_Protocol(http, cls, sock, header, method, version, path, i
if protocol then -- 仅支持协议回传, 具体实现由用户实现
insert(response, "Sec-Websocket-Protocol: "..tostring(protocol))
end
http:tolog(200, PATH, header['X-Real-IP'] or ip, X_Forwarded_FORMAT(header['X-Forwarded-For'] or ip), method, now() - start_time)
http:tolog(200, path, header['X-Real-IP'] or ip, X_Forwarded_FORMAT(header['X-Forwarded-For'] or ip), method, now() - start_time)
local ok = sock:send(concat(response, CRLF)..CRLF2)
if not ok then
return sock:close()
Expand Down

0 comments on commit 1ce2d86

Please sign in to comment.