Skip to content

Commit

Permalink
perf(ext-plugin): use a better API to create byte vector (apache#4195)
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
spacewander authored May 8, 2021
1 parent 3ebe800 commit bfd69df
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions apisix/plugins/ext-plugin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,7 @@ local rpc_handlers = {
local path = builder:CreateString(uri)

local bin_addr = var.binary_remote_addr
local len = #bin_addr
http_req_call_req.StartSrcIpVector(builder, len)
for i = len, 1, -1 do
builder:PrependByte(str_byte(bin_addr, i))
end
local src_ip = builder:EndVector(len)
local src_ip = builder.CreateByteVector(builder, bin_addr)

local args = core.request.get_uri_args(ctx)
local textEntries = {}
Expand Down

0 comments on commit bfd69df

Please sign in to comment.