diff options
-rw-r--r-- | default.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/default.lua b/default.lua index 1de910e..7100927 100644 --- a/default.lua +++ b/default.lua @@ -2,7 +2,11 @@ local RESPONSE = [[<!doctype html> <html lang="en"> <title>plop</title> <h1>Hello, from plop/lua!</h1> -<p>You requested <code>%s</code> using <b>%s</b> with %s and: +<table> +<tr><th>Method<th>Path<th>Version +<tr><td>%s<td>%s<td>%s +</table> +<hr> <table> <tr><th>Header<th>Value %s</table> @@ -25,9 +29,9 @@ return function (stream) end local headers_table = "" for header, value in pairs(headers) do - headers_table = HEADER:format(headers_table_body, header, value) + headers_table = HEADER:format(headers_table, header, value) end - local response = RESPONSE:format(path, method, version, headers_table_body) + local response = RESPONSE:format(method, path, version, headers_table) local headers = {Connection="close", ["Content-Length"]=#response, ["Content-Type"]="text/html"} return {status=status, headers=headers, data=response} end |