* Fixed webuci bootstrapper
* Added ffluci.http.header function
This commit is contained in:
parent
f8ac8062a5
commit
0120aec285
3 changed files with 9 additions and 1 deletions
|
@ -15,7 +15,7 @@ function init_req(context)
|
|||
env.PATH_INFO = "/" .. context.uri
|
||||
env.REMOTE_PORT = context.remote_port
|
||||
env.SERVER_ADDR = context.server_addr
|
||||
env.SCRIPT_NAME = REQUEST_URI:sub(1, #REQUEST_URI - #PATH_INFO)
|
||||
env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO)
|
||||
end
|
||||
|
||||
function handle_req(context)
|
||||
|
|
|
@ -53,6 +53,10 @@ function ffluci.http.formvaluetable(prefix)
|
|||
return ffluci.http.formvalue(prefix, {})
|
||||
end
|
||||
|
||||
-- Sends a custom HTTP-Header
|
||||
function ffluci.http.header(key, value)
|
||||
print(key .. ": " .. value)
|
||||
end
|
||||
|
||||
-- Set Content-Type
|
||||
function ffluci.http.prepare_content(type)
|
||||
|
|
|
@ -55,6 +55,10 @@ function ffluci.http.formvaluetable(prefix)
|
|||
return vals
|
||||
end
|
||||
|
||||
-- Sends a custom HTTP-Header
|
||||
function ffluci.http.header(key, value)
|
||||
print(key .. ": " .. value)
|
||||
end
|
||||
|
||||
-- Set Content-Type
|
||||
function ffluci.http.prepare_content(type)
|
||||
|
|
Loading…
Reference in a new issue