doth test: use extended reg. expression to check for HTTP/2 support

Using extended regular expressions to check for HTTP/2 support in curl
appears to be a more portable option, which also works on
e.g. OpenBSD.
This commit is contained in:
Artem Boldariev
2022-01-17 16:32:10 +02:00
parent 748b61554e
commit 4884ab0340

View File

@@ -551,7 +551,7 @@ status=$((status + ret))
# check whether we can use curl for sending test queries.
if [ -x "${CURL}" ] ; then
CURL_HTTP2="$(${CURL} --version | grep '^Features:.* HTTP2\( \|$\)')"
CURL_HTTP2="$(${CURL} --version | grep -E '^Features:.* HTTP2( |$)')"
if [ -n "$CURL_HTTP2" ]; then
testcurl=1