(no commit message)
[project/luci.git] / core / src / ffluci / sgi / haserl.lua
index 6fefd7baf831ac193ee3cfdde7fff73a6bd6ce77..7e9854d7d38505868a93b92bfa675488a520eb13 100644 (file)
@@ -63,6 +63,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("Status: " .. tostring(code) .. " " .. message)