summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-11-11 10:14:34 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-11-11 10:14:34 +0100
commit2258d3de253965862a4648ebb4528df150a27b79 (patch)
tree8368e7c6e487c5470f8fda3732d9c03b0493eac2
parentd05588e2d7f0a95f43e9b3a4bcaa7aa7ac9d8459 (diff)
parent5541065793913f8bf201123440e4a827ec779ebd (diff)
Merge pull request #535 from saik0/redirect-root-if-empty-signed
Redirect to root on empty path (signed off)
-rw-r--r--modules/luci-base/luasrc/http.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/http.lua b/modules/luci-base/luasrc/http.lua
index a92d8affb..4b3573172 100644
--- a/modules/luci-base/luasrc/http.lua
+++ b/modules/luci-base/luasrc/http.lua
@@ -208,6 +208,7 @@ function splice(fd, size)
end
function redirect(url)
+ if url == "" then url = "/" end
status(302, "Found")
header("Location", url)
close()