mirror of
https://git.sakamoto.pl/laudom/http.sh.git
synced 2026-01-12 20:21:15 +01:00
Compare commits
No commits in common. "master" and "v0.97.4" have entirely different histories.
1 changed files with 2 additions and 13 deletions
13
src/misc.sh
13
src/misc.sh
|
|
@ -111,18 +111,7 @@ _param_parse() {
|
||||||
# http_array(name, out_ref)
|
# http_array(name, out_ref)
|
||||||
http_array() {
|
http_array() {
|
||||||
[[ ! "$1" || ! "$2" ]] && return 1
|
[[ ! "$1" || ! "$2" ]] && return 1
|
||||||
if [[ ! "${http_array_refs[$1]}" ]]; then
|
[[ ! "${http_array_refs[$1]}" ]] && return 1
|
||||||
declare -ga $2
|
|
||||||
local -n ref=$2
|
|
||||||
|
|
||||||
if [[ "${post_data[$1]}" ]]; then
|
|
||||||
ref=("${post_data[$1]}")
|
|
||||||
elif [[ "${get_data[$1]}" ]]; then
|
|
||||||
ref=("${get_data[$1]}")
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
declare -gn $2=${http_array_refs[$1]}
|
declare -gn $2=${http_array_refs[$1]}
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue