Make Boa IPv6-ready. Patch by Alina Friedrichsen. Thanks a lot.
[project/luci.git] / libs / sgi-webuci / root / usr / lib / boa / luci.lua
index 387d577..2bb9313 100644 (file)
@@ -25,7 +25,7 @@ function init(path)
        if (root ~= '/') then
                -- Entering dummy mode
                luci.model.uci.cursor = function(config, ...)
-                       return uci2.cursor(config or root .. "/etc/config", ...)
+                       return uci.cursor(config or root .. "/etc/config", ...)
                end
                
                luci.sys.hostname = function() return "" end
@@ -59,6 +59,7 @@ function handle_req(context)
        env.REMOTE_PORT     = context.remote_port
        env.SERVER_ADDR     = context.server_addr
        env.HTTP_COOKIE     = context.cookie
+       env.HTTP_ACCEPT     = context.http_accept
        env.SCRIPT_NAME     = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO)
 
        luci.sgi.webuci.run(env, vars)