summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--core/contrib/webuci_bootstrap.lua2
-rw-r--r--core/src/ffluci/sgi/haserl.lua4
-rw-r--r--core/src/ffluci/sgi/webuci.lua4
3 files changed, 9 insertions, 1 deletions
diff --git a/core/contrib/webuci_bootstrap.lua b/core/contrib/webuci_bootstrap.lua
index 9a2fafb0ef..50ac8184b7 100644
--- a/core/contrib/webuci_bootstrap.lua
+++ b/core/contrib/webuci_bootstrap.lua
@@ -15,7 +15,7 @@ function init_req(context)
env.PATH_INFO = "/" .. context.uri
env.REMOTE_PORT = context.remote_port
env.SERVER_ADDR = context.server_addr
- env.SCRIPT_NAME = REQUEST_URI:sub(1, #REQUEST_URI - #PATH_INFO)
+ env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO)
end
function handle_req(context)
diff --git a/core/src/ffluci/sgi/haserl.lua b/core/src/ffluci/sgi/haserl.lua
index 0db558d990..6fefd7baf8 100644
--- a/core/src/ffluci/sgi/haserl.lua
+++ b/core/src/ffluci/sgi/haserl.lua
@@ -53,6 +53,10 @@ function ffluci.http.formvaluetable(prefix)
return ffluci.http.formvalue(prefix, {})
end
+-- Sends a custom HTTP-Header
+function ffluci.http.header(key, value)
+ print(key .. ": " .. value)
+end
-- Set Content-Type
function ffluci.http.prepare_content(type)
diff --git a/core/src/ffluci/sgi/webuci.lua b/core/src/ffluci/sgi/webuci.lua
index 75fffa5537..87bb69302c 100644
--- a/core/src/ffluci/sgi/webuci.lua
+++ b/core/src/ffluci/sgi/webuci.lua
@@ -55,6 +55,10 @@ function ffluci.http.formvaluetable(prefix)
return vals
end
+-- Sends a custom HTTP-Header
+function ffluci.http.header(key, value)
+ print(key .. ": " .. value)
+end
-- Set Content-Type
function ffluci.http.prepare_content(type)