blob: f21934e0a8c39d4812cc9f5817a6691d650048b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
module("webuci", package.seeall)
function prepare_req(uri)
env = {}
env.REQUEST_URI = uri
require("ffluci.dispatcher").createindex()
end
function init_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.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)
ffluci.dispatcher.httpdispatch()
end
|