asynciodebian/masterproxy-ticket
Last change
on this file since 3493a80 was
d50dac5,
checked in by Fiona Klute <fiona.klute@…>, 4 years ago
|
New test case for HTTP/2 support
|
-
Property mode set to
100755
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # |
---|
3 | # Check if HTTP/2 connections using mod_gnutls and mod_http2 work |
---|
4 | |
---|
5 | set -e |
---|
6 | : ${srcdir:="."} |
---|
7 | . ${srcdir}/common.bash |
---|
8 | netns_reexec ${@} |
---|
9 | |
---|
10 | testdir="${srcdir}/tests/28_HTTP2_support" |
---|
11 | TEST_NAME="$(basename ${testdir})" |
---|
12 | . $(dirname ${0})/apache_service.bash |
---|
13 | |
---|
14 | if [ ! -r ${AP_LIBEXECDIR}/mod_http2.so ]; then |
---|
15 | echo "mod_http2.so not found, skipping." 2>&1 |
---|
16 | exit 77 |
---|
17 | elif [ "$(basename ${HTTP_CLI})" != "curl" ] \ |
---|
18 | || ! ${HTTP_CLI} -V | grep -P '\sHTTP2($|\s)'; then |
---|
19 | echo "Curl not found or does not support HTTP/2, skipping." 2>&1 |
---|
20 | exit 77 |
---|
21 | fi |
---|
22 | |
---|
23 | function stop_server |
---|
24 | { |
---|
25 | apache_service "${testdir}" "apache.conf" stop |
---|
26 | } |
---|
27 | apache_service "${testdir}" "apache.conf" start "${TEST_LOCK}" |
---|
28 | trap stop_server EXIT |
---|
29 | |
---|
30 | output="outputs/${TEST_NAME}.output" |
---|
31 | header="outputs/${TEST_NAME}.header" |
---|
32 | rm -f "${output}" "${header}" |
---|
33 | |
---|
34 | URL="https://${TEST_HOST}:${TEST_PORT}/status?auto" |
---|
35 | ${HTTP_CLI} --http2 --location --verbose --cacert authority/x509.pem \ |
---|
36 | --dump-header "${header}" --output "${output}" "${URL}" |
---|
37 | |
---|
38 | echo "Checking for HTTP/2 in logged header:" |
---|
39 | grep "HTTP/2 200" "${header}" |
---|
40 | echo "Checking for TLS session status:" |
---|
41 | grep "Current TLS session: (TLS" "${output}" |
---|
42 | |
---|
43 | apache_service "${testdir}" "apache.conf" stop |
---|
44 | trap - EXIT |
---|
Note: See
TracBrowser
for help on using the repository browser.