fix(event_loop): fix some wrong allocs

This commit is contained in:
Jef Roosens 2023-11-14 15:36:18 +01:00
parent 29f4edc059
commit f97de2fe83
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
5 changed files with 14 additions and 10 deletions

View file

@ -10,11 +10,11 @@ fi
if [ "$1" = g ]; then
curl -is "$URL/$2" |
exec curl -is "$URL/$2" |
sed -En 's/^[lL]ocation: (.*)/\1/p'
elif [ "$1" = s ] || [ "$1" = sl ]; then
curl \
exec curl \
--fail \
-w "${URL}%header{location}" \
-XPOST \
@ -23,7 +23,7 @@ elif [ "$1" = s ] || [ "$1" = sl ]; then
"$URL/$1/$3"
elif [ "$1" = p ] || [ "$1" = pl ]; then
curl \
exec curl \
--fail \
-w "${URL}%header{location}" \
-XPOST \
@ -33,18 +33,19 @@ elif [ "$1" = p ] || [ "$1" = pl ]; then
"$URL/$1/$3"
elif [ "$1" = f ] || [ "$1" = fl ]; then
curl \
exec curl \
--fail \
-v \
-w "${URL}%header{location}" \
-XPOST \
-H "X-Api-Key: $API_KEY" \
-H "X-Lander-Content-Type: ${content_type}" \
-H "X-Lander-Filename: ${filename}" \
--data-binary @"$2" \
-T "$2" \
"$URL/$1/$3"
elif [ "$1" = d ]; then
curl \
exec curl \
--fail \
-XDELETE \
-H "X-Api-Key: $API_KEY" \