|
5 | 5 | # This source code is licensed under the BSD-style license found in the |
6 | 6 | # LICENSE file in the root directory of this source tree. |
7 | 7 |
|
8 | | -set -x |
9 | | - |
10 | | -curl -I https://wiki.mozilla.org/Abstract_Interpretation |
11 | | -curl -I https://mvnrepository.com/artifact/org.pytorch/executorch-android |
12 | | -curl -I https://www.cadence.com/en_US/home.html |
13 | | -curl -I https://www.cadence.com/en_US/home/tools/ip/tensilica-ip/hifi-dsps/hifi-4.html |
14 | | -curl -I -A "Mozilla/5.0" https://wiki.mozilla.org/Abstract_Interpretation |
15 | | -curl -I -A "Mozilla/5.0" https://mvnrepository.com/artifact/org.pytorch/executorch-android |
16 | | -curl -I -A "Mozilla/5.0" https://www.cadence.com/en_US/home.html |
17 | | -curl -I -A "Mozilla/5.0" https://www.cadence.com/en_US/home/tools/ip/tensilica-ip/hifi-dsps/hifi-4.html |
18 | | -curl -I -A "" https://wiki.mozilla.org/Abstract_Interpretation |
19 | | -curl -I -A "" https://mvnrepository.com/artifact/org.pytorch/executorch-android |
20 | | -curl -I -A "" https://www.cadence.com/en_US/home.html |
21 | | -curl -I -A "" https://www.cadence.com/en_US/home/tools/ip/tensilica-ip/hifi-dsps/hifi-4.html |
22 | | -curl -I -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" https://wiki.mozilla.org/Abstract_Interpretation |
23 | | -curl -I -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" https://mvnrepository.com/artifact/org.pytorch/executorch-android |
24 | | -curl -I -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" https://www.cadence.com/en_US/home.html |
25 | | -curl -I -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" https://www.cadence.com/en_US/home/tools/ip/tensilica-ip/hifi-dsps/hifi-4.html |
26 | | -curl -I -A "GitHubActions" https://wiki.mozilla.org/Abstract_Interpretation |
27 | | -curl -I -A "GitHubActions" https://mvnrepository.com/artifact/org.pytorch/executorch-android |
28 | | -curl -I -A "GitHubActions" https://www.cadence.com/en_US/home.html |
29 | | -curl -I -A "GitHubActions" https://www.cadence.com/en_US/home/tools/ip/tensilica-ip/hifi-dsps/hifi-4.html |
30 | | - |
31 | 8 | set -euo pipefail |
32 | 9 |
|
33 | 10 | status=0 |
34 | 11 | green='\e[1;32m'; red='\e[1;31m'; cyan='\e[1;36m'; yellow='\e[1;33m'; reset='\e[0m' |
| 12 | +user_agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" |
35 | 13 | last_filepath= |
36 | 14 |
|
37 | 15 | while IFS=: read -r filepath url; do |
38 | 16 | if [ "$filepath" != "$last_filepath" ]; then |
39 | 17 | printf '\n%s:\n' "$filepath" |
40 | 18 | last_filepath=$filepath |
41 | 19 | fi |
42 | | - code=$(curl -g -sSL -m30 \ |
43 | | - -A 'Mozilla/5.0' \ |
44 | | - -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \ |
45 | | - --range 0-0 \ |
46 | | - -w '%{http_code}' -o /dev/null \ |
47 | | - "$url") || code=000 |
| 20 | + code=$(curl -x fwdproxy:8080 -gsLm30 -o /dev/null -w "%{http_code}" -I "$url") || code=000 |
| 21 | + if [ "$code" -ge 400 ]; then |
| 22 | + code=$(curl -x fwdproxy:8080 -gsLm30 -o /dev/null -w "%{http_code}" -r 0-0 -A "$user_agent" "$url") || code=000 |
| 23 | + fi |
48 | 24 | if [ "$code" -ge 200 ] && [ "$code" -lt 400 ]; then |
49 | 25 | printf "${green}%s${reset} ${cyan}%s${reset}\n" "$code" "$url" |
50 | 26 | else |
|
0 commit comments