* Fixed SGI webuci to work with new HTTP API

This commit is contained in:
Steven Barth 2008-06-15 21:11:34 +00:00
parent 8d2f6c7041
commit 89f1f43c9d
2 changed files with 3 additions and 4 deletions

View file

@ -29,9 +29,8 @@ require("luci.util")
require("luci.dispatcher")
function run(env, vars)
local r = luci.http.Request(env, nil, io.stderr)
r.get = vars
r.post = r.get
local r = luci.http.Request(env, {}, io.stderr)
r.message.params = vars
local x = coroutine.create(luci.dispatcher.httpdispatch)

View file

@ -52,7 +52,7 @@ function Request.__init__(self, env, instream, errstream)
self.message = {
env = env,
headers = {},
params = luci.http.protocol.urldecode_params("?"..env.QUERY_STRING),
params = luci.http.protocol.urldecode_params("?"..(env.QUERY_STRING or "")),
}
setmetatable(self.message.params, {__index =