From ca5a5c9e7a95e04775f9f788f29be183daf7f282 Mon Sep 17 00:00:00 2001 From: Nils Date: Mon, 20 Sep 2021 17:42:07 +0200 Subject: [PATCH] fix double server headers and case sensitivity --- status.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/status.sh b/status.sh index 59e5917..f1ac58b 100755 --- a/status.sh +++ b/status.sh @@ -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")" }