Fix improper syntax in list
brackets needed for non-standard table indexing. Also added a trailing comma as its valid (and more consistent, imo).
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
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", [501]="Not Implemented",}
|
||||||
local myResult = codez[code]
|
local myResult = codez[code]
|
||||||
if myResult then return myResult else return "Unknown HTTP Status" end
|
if myResult then return myResult else return "Unknown HTTP Status" end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user