From ad243becbe95b45ba39e267e88cc6e27929c5afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 7 Aug 2025 20:35:28 +0200 Subject: [PATCH] download-frozen-image-v2: handle 307 responses without decimal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correctly parse HTTP response that doesn't contain an HTTP version with a decimal place: ``` < HTTP/2 307 ``` The previous version would only match strings like `HTTP/2.0 307`. Signed-off-by: Paweł Gronowski (cherry picked from commit 359a881cea6166a1c624e8750619fb9902a1074c) Signed-off-by: Paweł Gronowski --- contrib/download-frozen-image-v2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/download-frozen-image-v2.sh b/contrib/download-frozen-image-v2.sh index e4abca2f6a..330ad2e607 100755 --- a/contrib/download-frozen-image-v2.sh +++ b/contrib/download-frozen-image-v2.sh @@ -81,7 +81,7 @@ fetch_blob() { -D- )" curlHeaders="$(echo "$curlHeaders" | tr -d '\r')" - if grep -qE "^HTTP/[0-9].[0-9] 3" <<< "$curlHeaders"; then + if grep -qE "^HTTP/[0-9](.[0-9])* 3" <<< "$curlHeaders"; then rm -f "$targetFile" local blobRedirect