mirror of
https://github.com/TangentFoxy/lovebird.git
synced 2025-07-28 02:52:19 +00:00
Removed content-type from HTTP header
This commit is contained in:
@@ -603,13 +603,12 @@ function lovebird.onrequest(req, client)
|
||||
page = page ~= "" and page or "index"
|
||||
-- Handle "page not found"
|
||||
if not lovebird.pages[page] then
|
||||
return "HTTP/1.1 404\r\nContent-Type: text/html\r\n\r\nBad page"
|
||||
return "HTTP/1.1 404\r\n\r\nBad page"
|
||||
end
|
||||
-- Handle page
|
||||
local str
|
||||
xpcall(function()
|
||||
str = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n" ..
|
||||
lovebird.pages[page](lovebird, req)
|
||||
str = "HTTP/1.1 200 OK\r\n\r\n" .. lovebird.pages[page](lovebird, req)
|
||||
end, lovebird.onerror)
|
||||
return str
|
||||
end
|
||||
|
Reference in New Issue
Block a user