aboutsummaryrefslogtreecommitdiffstats
path: root/net/httpserver.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/httpserver.lua')
-rw-r--r--net/httpserver.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua
index addbfac0..6ebfcb76 100644
--- a/net/httpserver.lua
+++ b/net/httpserver.lua
@@ -207,15 +207,15 @@ end
-- The default handler for requests
default_handler = function (method, body, request)
log("debug", method.." request for "..tostring(request.path) .. " on port "..request.handler:serverport());
- return { status = "404 Not Found",
+ return { status = "404 Not Found",
headers = { ["Content-Type"] = "text/html" },
body = "<html><head><title>Page Not Found</title></head><body>Not here :(</body></html>" };
end
function new_request(handler)
- return { handler = handler, conn = handler.socket,
- write = function (...) return handler:write(...); end, state = "request",
+ return { handler = handler, conn = handler.socket,
+ write = function (...) return handler:write(...); end, state = "request",
server = http_servers[handler:serverport()],
send = send_response,
destroy = destroy_request,