* Fixed SGI webuci to work with new HTTP API
This commit is contained in:
parent
8d2f6c7041
commit
89f1f43c9d
2 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue