* fix POST data not being read when using router

merge-requests/2/head
Dominika Liberda 2021-08-01 19:20:36 +02:00
parent 61bd6b72fe
commit 67921ebab8
1 changed files with 2 additions and 3 deletions

View File

@ -101,7 +101,7 @@ while read -r param; do
for i in $data; do
name="$(sed -E 's/\=(.*)$//' <<< "$i")"
value="$(sed "s/$name\=//" <<< "$i")"
post_data[$name]="$value"
get_data[$name]="$value"
done
fi
fi
@ -174,8 +174,7 @@ if [[ "${cfg[proxy]}" == true ]]; then
r[status]=211
fi
if [[ "${r[post]}" == true && "${r[status]}" == 200 ]]; then
if [[ "${r[post]}" == true && "${r[status]}" == 200 ]] || [[ "${r[post]}" == true && "${r[status]}" == 212 ]]; then
# This whole ordeal is here to prevent passing binary data as a variable.
# I could have done it as an array, but this solution works, and it's
# speedy enough so I don't care.