Skip to content

Commit

Permalink
fix concat table bool and string
Browse files Browse the repository at this point in the history
  • Loading branch information
loveshell committed Jan 30, 2016
1 parent 3492d06 commit 6606edd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,14 @@ function args()
local args = ngx.req.get_uri_args()
for key, val in pairs(args) do
if type(val)=='table' then
if val ~= false then
data=table.concat(val, " ")
local t={}
for k,v in pairs(val) do
if v == true then
v=""
end
table.insert(t,v)
end
data=table.concat(t, " ")
else
data=val
end
Expand Down

0 comments on commit 6606edd

Please sign in to comment.