X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=core%2Fsrc%2Fffluci%2Fsgi%2Fwebuci.lua;fp=core%2Fsrc%2Fffluci%2Fsgi%2Fwebuci.lua;h=c60964662e8b8f14761ea358b8ca4fe17408f964;hb=fc65325c174e13cc1a9329d154e74069257ebb12;hp=297780295926960aa8290b92aa09dc91debbb297;hpb=21bd8ca76deec06b8e4f4dc3bc2ea75c7f9c3260;p=project%2Fluci.git diff --git a/core/src/ffluci/sgi/webuci.lua b/core/src/ffluci/sgi/webuci.lua index 2977802959..c60964662e 100644 --- a/core/src/ffluci/sgi/webuci.lua +++ b/core/src/ffluci/sgi/webuci.lua @@ -51,15 +51,25 @@ function ffluci.http.formvaluetable(prefix) return vals end +-- Returns the path info +function ffluci.http.get_path_info() + return webuci.PATH_INFO +end -- Returns the User's IP function ffluci.http.get_remote_addr() - return os.getenv("REMOTE_ADDR") + return webuci.REMOTE_ADDR +end + +-- Returns the request URI +function ffluci.http.get_request_uri() + return webuci.REQUEST_URI end + -- Returns the script name function ffluci.http.get_script_name() - return os.getenv("SCRIPT_NAME") + return webuci.SCRIPT_NAME end @@ -81,5 +91,5 @@ end -- Sets HTTP-Status-Header function ffluci.http.set_status(code, message) - print("Status: " .. tostring(code) .. " " .. message) + print(webuci.REQUEST_METHOD .. " " .. tostring(code) .. " " .. message) end