瀏覽代碼

Merge pull request #1 from borromeotlhs/rework-headers

Rework headers
TJ Borromeo 9 年之前
父節點
當前提交
fe2f227b0b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      httpserver-header.lua

+ 2 - 2
httpserver-header.lua

@@ -5,10 +5,10 @@
 return function (connection, code, extension)
 
    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]
       -- 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
 
    local function getMimeType(ext)