Merge pull request #1 from borromeotlhs/rework-headers

Rework headers
This commit is contained in:
TJ Borromeo 2015-05-06 13:58:12 -07:00
commit fe2f227b0b

View File

@ -5,10 +5,10 @@
return function (connection, code, extension) return function (connection, code, extension)
local function getHTTPStatusString(code) local function getHTTPStatusString(code)
local codez = {[200]="OK", [400]="Bad Request", [404]="Not Found", [501]="Not Implemented",} local codez = {[200]="OK", [400]="Bad Request", [404]="Not Found",}
local myResult = codez[code] local myResult = codez[code]
-- enforce returning valid http codes all the way throughout? -- enforce returning valid http codes all the way throughout?
if myResult then return myResult else return codez[501] end if myResult then return myResult else return "Not Implemented" end
end end
local function getMimeType(ext) local function getMimeType(ext)