From 219baa7b6262a7b2f59435b521abccf7d8f89f1a Mon Sep 17 00:00:00 2001 From: TJ Borromeo Date: Wed, 6 May 2015 13:36:20 -0700 Subject: [PATCH] Update httpserver-header.lua --- httpserver-header.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httpserver-header.lua b/httpserver-header.lua index f6467d6..38b5b6a 100644 --- a/httpserver-header.lua +++ b/httpserver-header.lua @@ -7,7 +7,8 @@ return function (connection, code, extension) local function getHTTPStatusString(code) local codez = {[200]="OK", [400]="Bad Request", [404]="Not Found", [501]="Not Implemented",} local myResult = codez[code] - if myResult then return myResult else return "Unknown HTTP Status" end + -- enforce returning valid http codes all the way throughout? + if myResult then return myResult else return codez[501] end end local function getMimeType(ext)