diff --git a/http/file_list.lua b/http/file_list.lua
index 81d657a..2935ec8 100644
--- a/http/file_list.lua
+++ b/http/file_list.lua
@@ -1,4 +1,4 @@
-return function (connection, args)
+return function (connection, req, args)
dofile("httpserver-header.lc")(connection, 200, 'html')
connection:send([===[
@@ -6,21 +6,18 @@ return function (connection, args)
Server File Listing
]===])
- coroutine.yield()
local remaining, used, total=file.fsinfo()
connection:send("Total size: " .. total .. " bytes
\n" ..
"In Use: " .. used .. " bytes
\n" ..
"Free: " .. remaining .. " bytes
\n" ..
"\nFiles:
\n
\n")
- coroutine.yield()
for name, size in pairs(file.list()) do
local isHttpFile = string.match(name, "(http/)") ~= nil
if isHttpFile then
local url = string.match(name, ".*/(.*)")
connection:send(' - ' .. url .. " (" .. size .. " bytes)
\n")
- coroutine.yield()
end
end
connection:send("
\n\n