perf(ext-plugin): use a better API to create byte vector (#4195)

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
This commit is contained in:
罗泽轩 2021-05-08 08:56:49 +08:00 committed by GitHub
parent 3ebe8004b1
commit bfd69df8a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = {}