Merge pull request #535 from saik0/redirect-root-if-empty-signed

Redirect to root on empty path (signed off)
This commit is contained in:
Jo-Philipp Wich 2015-11-11 10:14:34 +01:00
commit 2258d3de25

View 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()