1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

nuweb: Added mdlio app helpers.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2017-07-15 12:11:32 +02:00
parent e173c4613c
commit c1ba6ae4ec
7 changed files with 509 additions and 13 deletions

View file

@ -27,12 +27,10 @@ nuweb.router.tryexec.concrete() {
func=$2;
shift; shift;
echo "Checking Path Spec: '$path_spec', Query Spec: '$query_spec' Function:$func Additional Args:$@" >&2
nux.log trace "Checking Path Spec: '$path_spec', Query Spec: '$query_spec' Function:$func Additional Args:$@" >&2
IFS='/' read -ra spec_components <<< "$path_spec"
i=0
path_args=""
path_c="";
i=0;path_args="";path_c="";
for path in "${PATH_COMPONENTS[@]}" ; do
spec=${spec_components[$i]}
if [ "$spec" == "@+" ]; then
@ -71,7 +69,8 @@ nuweb.router.tryexec.concrete() {
fi
done
fi
$func $@ $path_args $path_c $query_args
path_c=$(dirty.url.decode "$path_c")
$func "$@" $path_args "$path_c" $query_args
exit 0
}
@ -99,7 +98,7 @@ nuweb.router.exec() {
if [ -z "$path" ] ; then
path="/"
fi
IFS='/' read -ra PATH_COMPONENTS <<< "$path"
$definition