fix random failures due to unnecessary headers on requests

was unintendedly replaying the save _H4 header on all requests, what was
causing random failures on responses from the API.
pull/5172/head
Vinicius Mello 3 weeks ago
parent 724f3aa301
commit 7b63ebfcaa

@ -192,6 +192,10 @@ _rest() {
response="$(_get "$LINODE_V4_API_URL$ep$data")" response="$(_get "$LINODE_V4_API_URL$ep$data")"
fi fi
# unset _H4, for it not to be used on every request unnecessarily, because it
# causes random failures inside Linode API when using unnecessary _H4 parameters (e.g. X-Filter)
unset _H4
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
_err "error $ep" _err "error $ep"
return 1 return 1

Loading…
Cancel
Save