mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
Merge branch 'tkrizek/doth-test-curl-set-e' into 'main'
Handle curl without HTTP/2 support in doth test See merge request isc-projects/bind9!8104
This commit is contained in:
@@ -854,7 +854,7 @@ status=$((status + ret))
|
|||||||
|
|
||||||
# check whether we can use curl for sending test queries.
|
# check whether we can use curl for sending test queries.
|
||||||
if [ -x "${CURL}" ] ; then
|
if [ -x "${CURL}" ] ; then
|
||||||
CURL_HTTP2="$(${CURL} --version | grep -E '^Features:.* HTTP2( |$)')"
|
CURL_HTTP2="$(${CURL} --version | grep -E '^Features:.* HTTP2( |$)' || true)"
|
||||||
|
|
||||||
if [ -n "$CURL_HTTP2" ]; then
|
if [ -n "$CURL_HTTP2" ]; then
|
||||||
testcurl=1
|
testcurl=1
|
||||||
@@ -870,7 +870,7 @@ if [ -n "$testcurl" ]; then
|
|||||||
echo_i "checking max-age for positive answer ($n)"
|
echo_i "checking max-age for positive answer ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
# use curl to query for 'example/SOA'
|
# use curl to query for 'example/SOA'
|
||||||
$CURL -kD headers.$n "https://10.53.0.1:${HTTPSPORT}/dns-query?dns=AAEAAAABAAAAAAAAB2V4YW1wbGUAAAYAAQ" > /dev/null 2>&1
|
$CURL -kD headers.$n "https://10.53.0.1:${HTTPSPORT}/dns-query?dns=AAEAAAABAAAAAAAAB2V4YW1wbGUAAAYAAQ" > /dev/null 2>&1 || ret=1
|
||||||
grep "cache-control: max-age=86400" headers.$n > /dev/null || ret=1
|
grep "cache-control: max-age=86400" headers.$n > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status + ret))
|
status=$((status + ret))
|
||||||
@@ -879,7 +879,7 @@ if [ -n "$testcurl" ]; then
|
|||||||
echo_i "checking max-age for negative answer ($n)"
|
echo_i "checking max-age for negative answer ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
# use curl to query for 'fake.example/TXT'
|
# use curl to query for 'fake.example/TXT'
|
||||||
$CURL -kD headers.$n "https://10.53.0.1:${HTTPSPORT}/dns-query?dns=AAEAAAABAAAAAAAABGZha2UHZXhhbXBsZQAAEAAB" > /dev/null 2>&1
|
$CURL -kD headers.$n "https://10.53.0.1:${HTTPSPORT}/dns-query?dns=AAEAAAABAAAAAAAABGZha2UHZXhhbXBsZQAAEAAB" > /dev/null 2>&1 || ret=1
|
||||||
grep "cache-control: max-age=3600" headers.$n > /dev/null || ret=1
|
grep "cache-control: max-age=3600" headers.$n > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status + ret))
|
status=$((status + ret))
|
||||||
|
Reference in New Issue
Block a user