mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-31 10:14:35 +01:00
Fix issue 118, curl http_code sometimes is 000 but it's an invalid JSON number
This commit is contained in:
@@ -63,6 +63,8 @@ curl_it() {
|
||||
else
|
||||
response=
|
||||
fi
|
||||
# When curl is unable to connect, http_code is "000" which is not a valid JSON number
|
||||
[ "${rc}" -eq "0" ] && rc=0
|
||||
response="{\"curl_code\":${returncode},\"http_code\":${rc},\"body\":\"${response}\"}"
|
||||
|
||||
echo "${response}"
|
||||
|
||||
Reference in New Issue
Block a user