Merge pull request #535 from saik0/redirect-root-if-empty-signed
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 11 Nov 2015 09:14:34 +0000 (10:14 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 11 Nov 2015 09:14:34 +0000 (10:14 +0100)
Redirect to root on empty path (signed off)

modules/luci-base/luasrc/http.lua

index a92d8af..4b35731 100644 (file)
@@ -208,6 +208,7 @@ function splice(fd, size)
 end
 
 function redirect(url)
+       if url == "" then url = "/" end
        status(302, "Found")
        header("Location", url)
        close()