# HG changeset patch # User jbe # Date 1435019592 -7200 # Node ID db8abd21762c05cdf72d1dcedf430eafca0a3b9a # Parent 6c02564342fe87b12fd42cf3b62f94863305b525 Code cleanup in helloworld.lua diff -r 6c02564342fe -r db8abd21762c helloworld.lua --- a/helloworld.lua Tue Jun 23 02:11:41 2015 +0200 +++ b/helloworld.lua Tue Jun 23 02:33:12 2015 +0200 @@ -13,13 +13,19 @@ local function error_response(status) request:send_status(status) request:send_header("Content-Type", "text/html") - request:send_data("\n", status, "\n

", status, "

\n\n") + request:send_data("\n") + request:send_data("", status, "\n") + request:send_data("

", status, "

\n") + request:send_data("\n") end if request.method == "GET" or request.method == "HEAD" then if request.path == "" then request:send_status("200 OK") request:send_header("Content-Type", "text/html; charset=UTF-8") - request:send_data("\nHello World Application\nHello World!\n\n") + request:send_data("\n") + request:send_data("Hello World Application\n") + request:send_data("

Hello World!

\n") + request:send_data("\n") else error_response("404 Not Found") end