Filter out blank lines

Response from the provider has changed so that there are blank lines at the end, which leads to the result can not be parsed correctly
This commit is contained in:
mod242 2020-04-16 20:03:34 +02:00 committed by GitHub
parent dbf659c575
commit 2c971a2598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ _ddnss_rest() {
# DDNSS uses GET to update domain info # DDNSS uses GET to update domain info
if [ "$method" = "GET" ]; then if [ "$method" = "GET" ]; then
response="$(_get "$url" | sed 's/<[a-zA-Z\/][^>]*>//g' | _tail_n 1)" response="$(_get "$url" | sed 's/<[a-zA-Z\/][^>]*>//g' | tr -s "\n" | _tail_n 1)"
else else
_err "Unsupported method" _err "Unsupported method"
return 1 return 1