Browse Source

Improved print to show what the method is for a specific URI

Marcos Kirsch 8 years ago
parent
commit
11ae46c96b
1 changed files with 1 additions and 3 deletions
  1. 1 3
      httpserver.lua

+ 1 - 3
httpserver.lua

@@ -41,8 +41,6 @@ return function (port)
             local uri = req.uri
             local fileServeFunction = nil
 
-            --print("Method: " .. method);
-
             if #(uri.file) > 32 then
                -- nodemcu-firmware cannot handle long filenames.
                uri.args = {code = 400, errorString = "Bad Request"}
@@ -105,7 +103,7 @@ return function (port)
 
             -- parse payload and decide what to serve.
             local req = dofile("httpserver-request.lc")(payload)
-            print("Requested URI: " .. req.request)
+            print(req.method .. ": " .. req.request)
             if conf.auth.enabled then
                auth = dofile("httpserver-basicauth.lc")
                user = auth.authenticate(payload) -- authenticate returns nil on failed auth