Improved print to show what the method is for a specific URI
This commit is contained in:
parent
86b00f922c
commit
11ae46c96b
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user