X-Git-Url: http://git.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=core%2Fsrc%2Fffluci%2Fsgi%2Fhaserl.lua;h=7e9854d7d38505868a93b92bfa675488a520eb13;hp=6fefd7baf831ac193ee3cfdde7fff73a6bd6ce77;hb=a3a51464fd8cffa6d18fa3f18be9c699901abd0d;hpb=0120aec28526235d5efce2bbb12bc0e89cae6352;ds=sidebyside diff --git a/core/src/ffluci/sgi/haserl.lua b/core/src/ffluci/sgi/haserl.lua index 6fefd7baf8..7e9854d7d3 100644 --- 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 +-- 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)