Skip to content

Commit f9a8ff2

Browse files
committed
use tinset and string format for custom headers
1 parent 362ddc6 commit f9a8ff2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/websocket/handshake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ local upgrade_request = function(req)
5252
}
5353
if req.headers then
5454
for header, value in pairs(req.headers) do
55-
lines[#lines+1] = tostring(header)..": "..tostring(value)
55+
tinsert(lines,string.format("%s: %s", header, value))
5656
end
5757
end
5858
if req.origin then

0 commit comments

Comments
 (0)