Skip to content

Commit c43250c

Browse files
authored
test
1 parent e9f954c commit c43250c

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

scripts/check_urls.sh

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,18 @@
88
set -x
99

1010
ua='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36'
11-
url='https://wiki.mozilla.org/Abstract_Interpretation'
11+
accept_hdr='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
12+
url='<<PUT_YOUR_URL_HERE>>'
1213

13-
curl -s -o /dev/null -w '%{http_code}\n' --http1.1 -I "$url"
14+
curl -s -o /dev/null -w '%{http_code}\n' -L "$url"
1415

15-
curl -s -o /dev/null -w '%{http_code}\n' --http1.1 --range 0-0 -A "$ua" "$url"
16+
curl -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" "$url"
1617

17-
curl -s -o /dev/null -w '%{http_code}\n' --http1.1 --range 0-0 -A "$ua" --compressed "$url"
18+
curl -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" -H "Accept: $accept_hdr" "$url"
1819

19-
curl -s -o /dev/null -w '%{http_code}\n' --http1.1 --range 0-0 -A "$ua" \
20-
-H 'Accept-Language: en-US,en;q=0.9' \
21-
"$url"
20+
curl -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" -H "Referer: https://$(echo $url | awk -F/ '{print $3}')/" "$url"
2221

23-
curl -s -o /dev/null -w '%{http_code}\n' --http1.1 --range 0-0 -A "$ua" \
24-
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
25-
-H 'Referer: https://wiki.mozilla.org/' \
26-
"$url"
22+
curl -4 -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" "$url"
2723

2824
set -euo pipefail
2925

0 commit comments

Comments
 (0)