|
7 | 7 |
|
8 | 8 | set -x |
9 | 9 |
|
10 | | -ua="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" |
11 | | -accept_hdr="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" |
12 | | -lang_hdr="en-US,en;q=0.9" |
13 | | -enc_hdr="gzip, deflate, br" |
14 | | -cache_hdr="no-cache" |
15 | | -conn_hdr="keep-alive" |
16 | | - |
| 10 | +ua="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" |
17 | 11 | url="https://wiki.mozilla.org/Abstract_Interpretation" |
| 12 | +jar="/tmp/ci_cookies.txt" |
18 | 13 |
|
19 | | -curl -s -o /dev/null -w '%{http_code}\n' \ |
20 | | - -I \ |
21 | | - -A "$ua" \ |
22 | | - -H "Accept: $accept_hdr" \ |
23 | | - -H "Accept-Language: $lang_hdr" \ |
24 | | - -H "Accept-Encoding: $enc_hdr" \ |
25 | | - -H "Connection: $conn_hdr" \ |
26 | | - -H "Cache-Control: $cache_hdr" \ |
27 | | - "$url" |
28 | | - |
29 | | -curl -s -o /dev/null -w '%{http_code}\n' \ |
30 | | - --range 0-0 \ |
31 | | - -A "$ua" \ |
32 | | - -H "Accept: $accept_hdr" \ |
33 | | - -H "Accept-Language: $lang_hdr" \ |
34 | | - -H "Accept-Encoding: $enc_hdr" \ |
35 | | - -H "Connection: $conn_hdr" \ |
36 | | - -H "Cache-Control: $cache_hdr" \ |
37 | | - "$url" |
| 14 | +curl -s -c "$jar" -A "$ua" --compressed "$url" |
38 | 15 |
|
39 | | -wget --spider --server-response --user-agent="$ua" "$url" 2>&1 \ |
40 | | - | awk '/^ HTTP\// { print $2 }' |
| 16 | +curl -s -b "$jar" -o /dev/null -w 'HEAD→%{http_code}\n' -I -A "$ua" "$url" |
41 | 17 |
|
42 | | -wget --spider --server-response --user-agent="$ua" --method=GET "$url" 2>&1 \ |
43 | | - | awk '/^ HTTP\// { print $2 }' |
| 18 | +curl -s -b "$jar" -o /dev/null -w 'RANGE→%{http_code}\n' --range 0-0 -A "$ua" "$url" |
44 | 19 |
|
45 | | -curl -s -o /dev/null -w '%{http_code}\n' \ |
46 | | - --http1.1 \ |
47 | | - -I \ |
48 | | - -A "$ua" \ |
49 | | - -H "Accept: $accept_hdr" \ |
50 | | - -H "Accept-Language: $lang_hdr" \ |
51 | | - -H "Accept-Encoding: $enc_hdr" \ |
52 | | - -H "Connection: $conn_hdr" \ |
53 | | - -H "Cache-Control: $cache_hdr" \ |
54 | | - "$url" |
| 20 | +curl -s -b "$jar" -o /dev/null -w 'GET →%{http_code}\n' -A "$ua" "$url" |
55 | 21 |
|
56 | 22 | set -euo pipefail |
57 | 23 |
|
|
0 commit comments