projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[project/luci.git]
/
core
/
src
/
ffluci
/
sgi
/
webuci.lua
diff --git
a/core/src/ffluci/sgi/webuci.lua
b/core/src/ffluci/sgi/webuci.lua
index 87bb69302c915d03d2e9d6cbd1fc7c222fe0eb86..5e17ab7935607a092593e613f67669cd58166a16 100644
(file)
--- a/
core/src/ffluci/sgi/webuci.lua
+++ b/
core/src/ffluci/sgi/webuci.lua
@@
-69,6
+69,13
@@
function ffluci.http.prepare_content(type)
print("Content-Type: "..type.."\n")
end
print("Content-Type: "..type.."\n")
end
+-- Asks the browser to redirect to "url"
+function ffluci.http.redirect(url)
+ ffluci.http.status(302, "Found")
+ ffluci.http.header("Location", url)
+ print()
+end
+
-- Sets HTTP-Status-Header
function ffluci.http.status(code, message)
print(webuci.env.SERVER_PROTOCOL .. " " .. tostring(code) .. " " .. message)
-- Sets HTTP-Status-Header
function ffluci.http.status(code, message)
print(webuci.env.SERVER_PROTOCOL .. " " .. tostring(code) .. " " .. message)