From 6606edda34850feb13222ba154f417fc854b2c23 Mon Sep 17 00:00:00 2001 From: loveshell <82163261@qq.com> Date: Sat, 30 Jan 2016 10:20:28 +0800 Subject: [PATCH] fix concat table bool and string --- init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 3eaf381..2eb5966 100644 --- a/init.lua +++ b/init.lua @@ -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