Skip to content

Commit

Permalink
Use http1.1 in curl recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwartzentruber committed Jan 3, 2025
1 parent 4ebeb5f commit dc8b369
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions recipes/linux/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,16 @@ function apt-install-auto () {

# Follow redirects and resolve a url
function resolve-url () {
curl --connect-timeout 25 --fail --location --retry 5 --show-error --silent --head --write-out "%{url_effective}" "$@" -o /dev/null
# disable http/2 because we frequently see this on firefox-ci:
# curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
# which curl will not retry because it is caused by buggy server/load balancer
curl --http1.1 --connect-timeout 25 --fail --location --retry 5 --show-error --silent --head --write-out "%{url_effective}" "$@" -o /dev/null
}

# wrap curl with sane defaults
function retry-curl () {
curl --connect-timeout 25 --fail --location --retry 5 --show-error --silent --write-out "%{stderr}[downloaded %{url_effective}]\n" "$@"
# see comment on for --http1.1 in resolve-url above
curl --http1.1 --connect-timeout 25 --fail --location --retry 5 --show-error --silent --write-out "%{stderr}[downloaded %{url_effective}]\n" "$@"
}

function get-deadline () {
Expand Down

0 comments on commit dc8b369

Please sign in to comment.