mirror of
https://github.com/bol-van/zapret2.git
synced 2026-03-20 16:25:49 +00:00
zapret-lib: remove bitable, use barray
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user