download-frozen-image-v2: handle 307 responses without decimal

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 <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-08-07 20:35:28 +02:00
parent e628fa0409
commit 359a881cea

View File

@@ -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