Software /
code /
prosody
Diff
net/httpserver.lua @ 2570:9e69aecad25e
net.httpserver: Trailing whitespace
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 08 Feb 2010 11:20:19 +0000 |
parent | 2483:2f235c57d713 |
child | 2571:8a16c5e92bcb |
line wrap: on
line diff
--- a/net/httpserver.lua Fri Feb 05 17:46:58 2010 +0000 +++ b/net/httpserver.lua Mon Feb 08 11:20:19 2010 +0000 @@ -207,15 +207,15 @@ -- 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,