libs/lucid-http: fix regressions with recent git uci
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 29 Dec 2009 17:50:35 +0000 (17:50 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 29 Dec 2009 17:50:35 +0000 (17:50 +0000)
libs/lucid-http/luasrc/lucid/http/DirectoryPublisher.lua
libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua
libs/lucid-http/luasrc/lucid/http/Redirector.lua

index b57b5586a21554ff2b001d7d86d526a4cf14788f..09cade49e1228fa0d409d10e0cbece665a57956f 100644 (file)
@@ -45,6 +45,6 @@ function factory(server, config)
                        vhost:set_handler(v, handler)
                end
        else
-               vhost:set_handler(config.virtual, handler)
+               vhost:set_handler(config.virtual or "", handler)
        end
-end
\ No newline at end of file
+end
index 92dd7e2cbeaa8e8969796474b1e051d947c12440..5dc70df841009769a5b012058d7a4a1af6f060d5 100644 (file)
@@ -64,10 +64,10 @@ function factory(server, config)
                end
        else
                mypath = config.virtual
-               vhost:set_handler(config.virtual, handler)
+               vhost:set_handler(config.virtual or "", handler)
        end
 
        if config.home then
                vhost.default = mypath
        end
-end
\ No newline at end of file
+end
index 73561af2da5c3115cd177a403007c758a634c104..66a86a7ff75dfd3764d02ba855acaa0aacda2d66 100644 (file)
@@ -29,5 +29,5 @@ function factory(server, config)
        end
 
        local handler = catchall.Redirect(config.name, config.physical)
-       vhost:set_handler(config.virtual, handler)
-end
\ No newline at end of file
+       vhost:set_handler(config.virtual or "", handler)
+end