mg.write("HTTP/1.0 200 OK\r\n") mg.write("Content-Type: text/html\r\n") mg.write("\r\n") mg.write([[

This is another example of a Lua server page, served by CivetWeb web server.

The following features are available:

\n"); mg.write("

Today is " .. os.date("%A") .. "

\n"); l = mg.request_info.content_length if l then mg.write("

Content-Length = "..l..":
\n

\n")
  mg.write(mg.read())
  mg.write("\n
\n

\n") end mg.write("

\n"); if lfs then mg.write("Files in " .. lfs.currentdir()) mg.write("\n

\n") end mg.write([[

]])