projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
d05588e
)
Merge pull request #535 from saik0/redirect-root-if-empty-signed
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 11 Nov 2015 09:14:34 +0000
(10:14 +0100)
committer
Jo-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
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/http.lua
b/modules/luci-base/luasrc/http.lua
index
a92d8af
..
4b35731
100644
(file)
--- 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()