This commit makes the 'doth' system test skip HTTP headers check when
curl version is new enough but was compiled without HTTP/2 support.
This should fix the 'doth' system test for macOS systems using
macports.
# check whether we can use curl for sending test queries.
if [ -x "${CURL}" ] ; then
- CURL_VERSION="$(curl --version | cut -d ' ' -f 2 | head -n 1)"
- CURL_MAJOR="$(echo "$CURL_VERSION" | cut -d '.' -f 1)"
- CURL_MINOR="$(echo "$CURL_VERSION" | cut -d '.' -f 2)"
+ CURL_HTTP2="$(${CURL} --version | grep '^Features:.* HTTP2\( \|$\)')"
- if [ "$CURL_MAJOR" -ge 7 ] && [ "$CURL_MINOR" -ge 49 ]; then
+ if [ -n "$CURL_HTTP2" ]; then
testcurl=1
else
- echo_i "The available version of CURL is too old (it should be >= 7.49)"
+ echo_i "The available version of CURL does not have HTTP/2 support"
fi
fi