OpenWrt
/branches/18.06.1/package/network/services/uhttpd/files/uhttpd.config |
@@ -24,7 +24,7 @@ |
# If this number is exceeded, further requests are |
# queued until the number of running requests drops |
# below the limit again. |
option max_requests 1 |
option max_requests 3 |
|
# Maximum number of concurrent connections. |
# If this number is exceeded, further TCP connection |
@@ -49,13 +49,10 @@ |
# list interpreter ".php=/usr/bin/php-cgi" |
# list interpreter ".cgi=/usr/bin/perl" |
|
# List of prefix->Lua handler mappings. |
# Any request to an URL beneath the prefix |
# will be dispatched to the associated Lua |
# handler script. Lua support is disabled when |
# no handler mappings are specified. Lua prefix |
# matches have precedence over the CGI prefix. |
list lua_prefix "/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua" |
# Lua url prefix and handler script. |
# Lua support is disabled if no prefix given. |
option lua_prefix /luci |
option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua |
|
# Specify the ubus-rpc prefix and socket path. |
# option ubus_prefix /ubus |
/branches/18.06.1/package/network/services/uhttpd/files/uhttpd.init |
@@ -74,18 +74,6 @@ |
haveauth=1 |
} |
|
append_lua_prefix() { |
local v="$1" |
local prefix="${v%%=*}" |
local handler="${v#*=}" |
|
if [ "$prefix" != "$handler" ] && [ -n "$prefix" ] && [ -f "$handler" ]; then |
procd_append_param command -l "$prefix" -L "$handler" |
else |
echo "Skipping invalid Lua prefix \"$v\"" >&2 |
fi |
} |
|
start_instance() |
{ |
UHTTPD_CERT="" |
@@ -117,16 +105,10 @@ |
append_arg "$cfg" config "-c" |
append_arg "$cfg" cgi_prefix "-x" |
[ -f /usr/lib/uhttpd_lua.so ] && { |
local len |
config_get len "$cfg" lua_prefix_LENGTH |
|
if [ -n "$len" ]; then |
config_list_foreach "$cfg" lua_prefix append_lua_prefix |
else |
config_get prefix "$cfg" lua_prefix |
config_get handler "$cfg" lua_handler |
append_lua_prefix "$prefix=$handler" |
fi |
config_get handler "$cfg" lua_handler |
[ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && { |
procd_append_param command "-L" "$handler" |
} |
} |
[ -f /usr/lib/uhttpd_ubus.so ] && { |
append_arg "$cfg" ubus_prefix "-u" |