Browse Source

Merge pull request #90 from HHHartmann/BugFixErrorpage

  use correct code for erropage instead of failing
Marcos 7 years ago
parent
commit
737477c725
1 changed files with 2 additions and 2 deletions
  1. 2 2
      httpserver-error.lua

+ 2 - 2
httpserver-error.lua

@@ -3,6 +3,6 @@
 -- Author: Marcos Kirsch, Gregor Hartmann
 
 return function (connection, req, args)
-   local statusString = dofile("httpserver-header.lc")(connection, req.code, "html", false, req.headers)
-   connection:send("<html><head><title>" .. req.code .. " - " .. statusString .. "</title></head><body><h1>" .. req.code .. " - " .. statusString .. "</h1></body></html>\r\n")
+   local statusString = dofile("httpserver-header.lc")(connection, args.code, "html", false, req.headers)
+   connection:send("<html><head><title>" .. args.code .. " - " .. statusString .. "</title></head><body><h1>" .. args.code .. " - " .. statusString .. "</h1></body></html>\r\n")
 end