(no commit message)
[project/luci.git] / core / src / ffluci / sgi / webuci.lua
index 87bb69302c915d03d2e9d6cbd1fc7c222fe0eb86..5e17ab7935607a092593e613f67669cd58166a16 100644 (file)
@@ -69,6 +69,13 @@ function ffluci.http.prepare_content(type)
        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)