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
/
haserl.lua
diff --git
a/core/src/ffluci/sgi/haserl.lua
b/core/src/ffluci/sgi/haserl.lua
index
6fefd7b
..
7e9854d
100644
(file)
--- a/
core/src/ffluci/sgi/haserl.lua
+++ b/
core/src/ffluci/sgi/haserl.lua
@@
-63,6
+63,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("Status: " .. tostring(code) .. " " .. message)
-- Sets HTTP-Status-Header
function ffluci.http.status(code, message)
print("Status: " .. tostring(code) .. " " .. message)