diff options
author | Steven Barth <steven@midlink.org> | 2009-07-27 12:09:46 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-07-27 12:09:46 +0000 |
commit | 17e7f67a7c0bbfa26154005a49faf74b3573ff5d (patch) | |
tree | 4a33f661b689c70d0935cb036685adfd8b76e5a1 /libs/lucid-http/luasrc/lucid/http/server.lua | |
parent | ce98fdd80f549ab72c25c5cd799d4946433e4e2c (diff) |
Add native support for homepages
Diffstat (limited to 'libs/lucid-http/luasrc/lucid/http/server.lua')
-rw-r--r-- | libs/lucid-http/luasrc/lucid/http/server.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/lucid-http/luasrc/lucid/http/server.lua b/libs/lucid-http/luasrc/lucid/http/server.lua index cb10813b9..eb6f6f54f 100644 --- a/libs/lucid-http/luasrc/lucid/http/server.lua +++ b/libs/lucid-http/luasrc/lucid/http/server.lua @@ -198,6 +198,10 @@ function VHost.process(self, request, ...) -- Call URI part request.env.PATH_INFO = uri + if self.default and uri == "/" then + return 302, {Location = self.default} + end + for k, h in pairs(self.handlers) do if #k > hlen then if uri == k or (uri:sub(1, #k) == k and uri:byte(#k+1) == sc) then |