Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

header组装性能问题 #11

Open
siddontang opened this issue Jun 21, 2013 · 1 comment
Open

header组装性能问题 #11

siddontang opened this issue Jun 21, 2013 · 1 comment

Comments

@siddontang
Copy link

local h = ""
for i, v in pairs(nreqt.headers) do
-- fix cookie is a table value
if type(v) == "table" and i == "cookie" then
v = table.concat(v, "; ")
end
h = i .. ": " .. v .. "\r\n" .. h
end

h = i .. ": " .. v .. "\r\n" .. h 如果headers比较多是否会有性能问题,为什么不考虑使用table.concat?

@wendal
Copy link
Collaborator

wendal commented Jun 21, 2013

欢迎提交pull req

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants