From cc5ea861877c8e4322c85a18e930a4fac98986f4 Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Mon, 1 Aug 2022 21:06:42 +0200 Subject: [PATCH] Add --compressed to curl command This prevents 403 errors on help.github.com (https://github.com/github/docs/issues/17358). --- checklinks | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/checklinks b/checklinks index 376d8cf..371f98b 100755 --- a/checklinks +++ b/checklinks @@ -33,8 +33,9 @@ GREEN='\033[0;32m' BLUE='\033[0;34m' NC='\033[0m' # No Color +# --compressed : https://github.com/github/docs/issues/17358 function doCurl() { - curl -o /dev/null --silent --connect-timeout "$TIMEOUT" --retry $RETRY --retry-delay $RETRY_DELAY --user-agent "$USER_AGENT" --location --write-out '%{http_code}' "$1" + curl -o /dev/null --silent --compressed --connect-timeout "$TIMEOUT" --retry $RETRY --retry-delay $RETRY_DELAY --user-agent "$USER_AGENT" --location --write-out '%{http_code}' "$1" } [ ! -d "$1" ] && echo "'$1' is not a directory" && exit 1