fix(event_loop): fix some wrong allocs
This commit is contained in:
parent
29f4edc059
commit
f97de2fe83
5 changed files with 14 additions and 10 deletions
13
landerctl
13
landerctl
|
|
@ -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" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue