From 5f40074c0e2a6193cdd89893309787b2d31a24e4 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 26 May 2008 09:45:12 +0000 Subject: * Updated dispatcher to use fastindex if available * Updated webuci SGI * Updated dispatcher --- applications/sgi-webuci/root/lib/webuci/main.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'applications/sgi-webuci/root/lib/webuci') diff --git a/applications/sgi-webuci/root/lib/webuci/main.lua b/applications/sgi-webuci/root/lib/webuci/main.lua index 478c2a94e3..cb2730d147 100644 --- a/applications/sgi-webuci/root/lib/webuci/main.lua +++ b/applications/sgi-webuci/root/lib/webuci/main.lua @@ -1,21 +1,20 @@ module("webuci", package.seeall) function prepare_req(uri) + require("luci.dispatcher").createindex() env = {} env.REQUEST_URI = uri - require("luci.dispatcher").createindex() end -function init_req(context) +function handle_req(context) env.SERVER_PROTOCOL = context.server_proto env.REMOTE_ADDR = context.remote_addr env.REQUEST_METHOD = context.request_method - env.PATH_INFO = "/" .. context.uri + env.PATH_INFO = context.uri env.REMOTE_PORT = context.remote_port env.SERVER_ADDR = context.server_addr env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO) -end - -function handle_req(context) + + luci.sgi.webuci.initenv(env) luci.dispatcher.httpdispatch() end \ No newline at end of file -- cgit v1.2.3