mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 06:04:31 +02:00
Use the length operator (#) instead of table.getn.
table.getn was deprecated in Lua 5.1 in favor of #, the length operator. See: http://www.lua.org/manual/5.1/manual.html#7.2
This commit is contained in:
@ -66,7 +66,7 @@ local check_request = function(request, expect, ignore)
|
||||
local response = {}
|
||||
response.code, response.headers, response.status =
|
||||
socket.skip(1, http.request(request))
|
||||
if t and table.getn(t) > 0 then response.body = table.concat(t) end
|
||||
if t and #t > 0 then response.body = table.concat(t) end
|
||||
check_result(response, expect, ignore)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user