Redirect to root on empty path 535/head
authorJoel Pedraza <github@saik0.net>
Fri, 30 Oct 2015 15:22:15 +0000 (11:22 -0400)
committerJoel Pedraza <joel@joelpedraza.com>
Tue, 3 Nov 2015 14:53:39 +0000 (09:53 -0500)
commit5541065793913f8bf201123440e4a827ec779ebd
tree90384abae132c43033edb652b71a77f282658063
parent20851933bf31579be72cf593a22e00e33ee9105b
Redirect to root on empty path

* Prevents an empty Location header
* Useful in environments where build_url() could return an empty string (such as http server rewrites requests to /cgi-bin/luci)

Signed-off-by: Joel Pedraza <github@saik0.net>
modules/luci-base/luasrc/http.lua