Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-20 00:05:48 +00:00

zapret-lib: remove bitable, use barray

This commit is contained in:
bol-van
2026-01-11 15:36:10 +03:00
parent 3aad1f9ed9
commit ca8104c72a
4 changed files with 2 additions and 15 deletions

View File

@@ -330,16 +330,6 @@ function btable(a, packer)
return s
end
end
-- convert table a to packed string using 'packer' function. numeric indexes only, ordered
function bitable(a, packer)
if a then
local s=""
for k,v in ipairs(a) do
s = s .. packer(v)
end
return s
end
end
-- sequence comparision functions. they work only within 2G interval
-- seq1>=seq2
@@ -1626,7 +1616,7 @@ function http_dissect_reply(http)
end
function http_reconstruct_headers(headers, unixeol)
local eol = unixeol and "\n" or "\r\n"
return headers and bitable(headers, function(a) return a.header..": "..a.value..eol end) or ""
return headers and barray(headers, function(a) return a.header..": "..a.value..eol end) or ""
end
function http_reconstruct_req(hdis, unixeol)
local eol = unixeol and "\n" or "\r\n"