-
Notifications
You must be signed in to change notification settings - Fork 40
/
http2_test.sh
53 lines (37 loc) · 1.08 KB
/
http2_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -u
function curl() {
command curl "$@" --limit-rate 5M \
-o /dev/null -w "HTTP/%{http_version}" -m 5 \
2>&1 | grep -v 'Operation timed out after'
echo; echo
}
[ "$#" -eq 1 ] || {
echo "Usage: $0 URL" >&2
exit 1
}
SRV="$1"; shift
###
UNIQ_ID="test_id=$(date +%s)"
URI="$SRV?$UNIQ_ID"
echo "### Performing test with ID $UNIQ_ID"
echo "### grep $UNIQ_ID /var/log/access.mod_h2_issue_203"
echo
echo "# http2_whole_ssl"
curl --http2 "https://$URI&_http2_whole_ssl___"
echo "# http11_whole_ssl"
curl --http1.1 "https://$URI&http11_whole_ssl___"
echo "# http10_whole_ssl"
curl --http1.0 "https://$URI&http10_whole_ssl___"
###
echo "# http2_whole_nonssl"
curl --http2 "http://$URI&_http2_whole_nonssl"
echo "# http11_whole_nonssl"
curl --http1.1 "http://$URI&http11_whole_nonssl"
echo "# http10_whole_nonssl"
curl --http1.0 "http://$URI&http10_whole_nonssl"
###
echo "# http2_half_ssl"
curl --http2 -H "Range: bytes=0-52428800" "https://$URI&_http2_half_ssl____"
echo "# http11_half_ssl"
curl --http1.1 -H "Range: bytes=0-52428800" "https://$URI&http11_half_ssl____"