The curl command used by this orb's install command has started failing in some older versions of curl (e.g. curl 7.54.0 (x86_64-apple-darwin18.0)) likely due to recent underlying changes in the web server for https://circle.ci/cli such that it now performs redirection with HTTP/2. The error message shown by curl is curl: (16) Error in the HTTP2 framing layer.
Based on tests, newer versions of curl do not have this issue (e.g. curl 7.68.0 (x86_64-apple-darwin18.7.0))
Code changes
This fix makes use of the --http1.1 option in curl to prevent usage of HTTP/2, and omits the option for versions of curl that do not support the --http1.1 option, like curl 7.29.0 (x86_64-redhat-linux-gnu).
Versions of curl that do not support --http1.1 likely do not default to HTTP/2 anyway, and hence should be not affected by this issue.
Problem
The
curl
command used by this orb'sinstall
command has started failing in some older versions ofcurl
(e.g.curl 7.54.0 (x86_64-apple-darwin18.0)
) likely due to recent underlying changes in the web server for https://circle.ci/cli such that it now performs redirection with HTTP/2. The error message shown bycurl
iscurl: (16) Error in the HTTP2 framing layer
.Example of job that encountered the error: https://circleci.com/gh/CircleCI-Public/circleci-cli-orb/102
Based on tests, newer versions of
curl
do not have this issue (e.g.curl 7.68.0 (x86_64-apple-darwin18.7.0)
)Code changes
This fix makes use of the
--http1.1
option incurl
to prevent usage of HTTP/2, and omits the option for versions ofcurl
that do not support the--http1.1
option, likecurl 7.29.0 (x86_64-redhat-linux-gnu)
.Versions of
curl
that do not support--http1.1
likely do not default to HTTP/2 anyway, and hence should be not affected by this issue.Tests
Example of job that previously failed but now succeeds with fix applied: https://circleci.com/gh/CircleCI-Public/circleci-cli-orb/147 Example of job with fix applied, that skips
--http1.1
because the version ofcurl
doesn't support it: https://circleci.com/gh/CircleCI-Public/circleci-cli-orb/152