summaryrefslogtreecommitdiffhomepage
path: root/libs/sgi-wsapi
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-20 19:57:57 +0000
committerSteven Barth <steven@midlink.org>2008-06-20 19:57:57 +0000
commit65870edf9f1e579b4301e1677d70c9387a9a72dc (patch)
treead34a187c824027f8e328bece03c3f67527a89f2 /libs/sgi-wsapi
parente2e9e119d670ec80954fc8c018b479b218a7e47e (diff)
* libs/core: Added garbage collector to luci.util.threadlocal to avoid memory leaks
* libs/http: Use env-Variables instead of headers for parse_message_body and subsequent functions * libs/http: Added missing urldecode call for parsing urlencoded params * libs/web: Ported luci.http to use ltn12 sources and sinks instead of sockets or file pointers * libs/sgi-cgi, libs/sgi-webuci, libs/sgi-wsapi: Updated to work with new luci.http.Request ABI
Diffstat (limited to 'libs/sgi-wsapi')
-rw-r--r--libs/sgi-wsapi/luasrc/sgi/wsapi.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua
index f77ac5c5b..5b237cd7a 100644
--- a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua
+++ b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua
@@ -24,14 +24,17 @@ limitations under the License.
]]--
module("luci.sgi.wsapi", package.seeall)
+require("ltn12")
require("luci.http")
require("luci.dispatcher")
require("luci.http.protocol")
function run(wsapi_env)
- local r = luci.http.Request(wsapi_env, wsapi_env.input, wsapi_env.error)
- r.postds = function() return wsapi.request.parse_post_data(wsapi_env) end
- r.getds = function() return wsapi.request.parse_qs(wsapi_env.QUERY_STRING) end
+ local r = luci.http.Request(
+ wsapi_env,
+ ltn12.source.file(wsapi_env.input),
+ ltn12.sink.file(wsapi_env.error)
+ )
local res, id, data1, data2 = true, 0, nil, nil
local headers = {}