tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 0679f1132f2fe2635f66134cceaec017e83f6b76
parent f83246f0cc1e115c1091088df492cd29bddd4c32
Author: Corey Bryant <corey@thunderbird.net>
Date:   Thu, 20 Nov 2025 19:09:33 +0000

Bug 2000112 - Update checks in test-mar-url.sh to support HTTP/2. r=releng-reviewers,jcristau

Differential Revision: https://phabricator.services.mozilla.com/D272554

Diffstat:
Mtools/update-verify/release/test-mar-url.sh | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/update-verify/release/test-mar-url.sh b/tools/update-verify/release/test-mar-url.sh @@ -9,7 +9,7 @@ mar_file_curl_exit_code=$? # Bug 894368 - HTTP 408's are not handled by the "curl --retry" mechanism; in this case retry in bash attempts=1 -while [ "$((++attempts))" -lt 50 ] && grep 'HTTP/1\.1 408 Request Timeout' "${mar_headers_file}" &>/dev/null +while [ "$((++attempts))" -lt 50 ] && grep -E 'HTTP/[^ ]+ 408' "${mar_headers_file}" &>/dev/null do sleep 1 curl --retry 50 --retry-max-time 300 -s -i -r 0-2 -L -v "${mar_url}" > "${mar_headers_file}" 2>"${mar_headers_debug_file}" @@ -34,11 +34,12 @@ elif [ -z "${mar_actual_size}" ] then echo "$(date): FAILURE: Could not retrieve http header for mar file from ${mar_url}" > "$(mktemp -t log.XXXXXXXXXX)" echo "NO_MAR_FILE ${mar_url} ${mar_headers_file} ${mar_headers_debug_file} ${mar_file_curl_exit_code} ${mar_actual_url}" > "$(mktemp -t failure.XXXXXXXXXX)" - # If we get a response code (i.e. not an empty string), it better contain "206 Partial Content" or we should report on it. + # If we get a response code (i.e. not an empty string), it better contain " 206" or we should report on it. + # This works for both "HTTP/1.1 206 Partial Content" and "HTTP/2 206". # If response code is empty, this should be caught by a different block to this one (e.g. "could not retrieve http header"). -elif [ -n "${http_response_code}" ] && [ "${http_response_code}" == "${http_response_code/206 Partial Content/}" ] +elif [ -n "${http_response_code}" ] && [ "${http_response_code}" == "${http_response_code/ 206/}" ] then - echo "$(date): FAILURE: received a '${http_response_code}' response for mar file from ${mar_url} (expected HTTP 206 Partial Content)" > "$(mktemp -t log.XXXXXXXXXX)" + echo "$(date): FAILURE: received a '${http_response_code}' response for mar file from ${mar_url} (expected HTTP 206)" > "$(mktemp -t log.XXXXXXXXXX)" echo "BAD_HTTP_RESPONSE_CODE_FOR_MAR ${mar_url} ${mar_headers_file} ${mar_headers_debug_file} ${mar_file_curl_exit_code} ${mar_actual_url}" > "$(mktemp -t failure.XXXXXXXXXX)" else echo "$(date): FAILURE: Mar file incorrect size - should be ${mar_required_size} bytes, but is ${mar_actual_size} bytes - ${mar_url_with_redirects}" > "$(mktemp -t log.XXXXXXXXXX)"