1
0
mirror of https://github.com/byReqz/status.git synced 2024-12-25 12:41:49 +00:00

fix double server headers and case sensitivity

This commit is contained in:
Nils 2021-09-20 17:42:07 +02:00
parent a33429aa4b
commit ca5a5c9e7a
Signed by: byreqz
GPG Key ID: 396A62D7D436749E

View File

@ -25,7 +25,7 @@ function get_code {
elif [[ "$http_code" < 599 && "$http_code" > 499 ]];then
http_code="[\e[31m"$http_code"\e[0m"
fi
http_server=" | $(echo "$http_raw" | grep Server: | cut -d " " -f 2)]"
http_server=" | $(echo "$http_raw" | grep --ignore-case "server" | sort -u | cut -d " " -f 2)]"
http_results=""$http_results"
$(printf "%-50s%s\n" ["$h"] "$http_code""$http_server")"
}