~lastrosade/getcraft

a9c57c73f16aeefc9b49e09f32ba3e4e088546d8 — jeremy.shields 5 years ago 60db0f6
404
1 files changed, 4 insertions(+), 3 deletions(-)

M src/index.lua
M src/index.lua => src/index.lua +4 -3
@@ 86,7 86,6 @@ http.createServer(function (req, res)

			routed = true
			if (route.status) then
				vardump(route.status)
				res:writeHead(route.status, {})
			end



@@ 148,6 147,7 @@ http.createServer(function (req, res)
				-- '" .. route.type .. "' 
				res:setHeader("Content-Length", #err)
				res:finish(err)

			end

			break


@@ 156,8 156,9 @@ http.createServer(function (req, res)

	if (routed == false) then
		res:writeHead(404, {})
		res:setHeader("Content-Length", 0)
		res:finish()
		err = "404, The request does not match any routes"
		res:setHeader("Content-Length", #err)
		res:finish(err)
	end

end):listen(port, host)