From 961bfcf77f6bf114e721a418220c2d6a3ef1379c Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 15 Jun 2008 12:34:16 +0000 Subject: * Generalized HTTP-API --- libs/sgi-wsapi/luasrc/sgi/wsapi.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libs/sgi-wsapi/luasrc') diff --git a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua index e7082493c6..f77ac5c5bc 100644 --- a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua +++ b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua @@ -26,13 +26,12 @@ limitations under the License. module("luci.sgi.wsapi", package.seeall) require("luci.http") require("luci.dispatcher") -require("wsapi.request") +require("luci.http.protocol") function run(wsapi_env) - local r = luci.http.Request() - r.env = wsapi_env - r.request = wsapi.request.parse_post_data(wsapi_env, - wsapi.request.parse_qs(wsapi_env.QUERY_STRING)) + 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 res, id, data1, data2 = true, 0, nil, nil local headers = {} -- cgit v1.2.3