You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/02/27 10:18:38 UTC
[apisix] branch master updated: chore: correct pre-allocate size (#6454)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 77e90d2 chore: correct pre-allocate size (#6454)
77e90d2 is described below
commit 77e90d2f3d2e7023b5b19b4709805f548b979264
Author: Gerrard-YNWA <gy...@163.com>
AuthorDate: Sun Feb 27 18:18:32 2022 +0800
chore: correct pre-allocate size (#6454)
---
apisix/init.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apisix/init.lua b/apisix/init.lua
index cb48df4..2f9befd 100644
--- a/apisix/init.lua
+++ b/apisix/init.lua
@@ -621,7 +621,7 @@ function _M.http_header_filter_phase()
local debug_headers = api_ctx.debug_headers
if debug_headers then
- local deduplicate = core.table.new(#debug_headers, 0)
+ local deduplicate = core.table.new(core.table.nkeys(debug_headers), 0)
for k, v in pairs(debug_headers) do
core.table.insert(deduplicate, k)
end