Conversation
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>
Passing the Auth to the redirected location was fixed in curl 7.58: https://curl.se/changes.html#7_58_0 so we no longer need the extra handling and can just use `-L` to let curl handle redirects. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
|
Ah we are rate-limited https://github.com/moby/moby/actions/runs/16813272998/job/47623886544?pr=50662#step:8:463 🤦♂️ |
| "$blobRedirect" \ | ||
| -o "$targetFile" | ||
| fi | ||
| curl -L -S "${curlArgs[@]}" \ |
There was a problem hiding this comment.
We can use -fsSL now then I think? (like the other ones); doing so prevents capturing garbage if there's a failure (-f does a "fail fast" - preventing output to be captured on failure, and -s runs "silent" (but prints errors if they happen due to the other ones).
There was a problem hiding this comment.
Should probably also drop the -D- to not dump headers to stdout.
There was a problem hiding this comment.
Yes, I was eyeing some of that as well, and got confused "are we capturing stdout here, or are we outputting to a file?
But it was a long day, and this fixed the immediate problem, so I left that for "let's look into that later; we now know the cause of the problem, and it's for our own CI only, so let's fix that first".
(contributions welcome though if you want to dig in! <3)
download-frozen-image-v2: Use curl -L
Passing the Auth to the redirected location was fixed in curl 7.58: https://curl.se/changes.html#7_58_0 so we no longer need the extra handling and can just use
-Lto let curl handle redirects.download-frozen-image-v2: handle 307 responses without decimal
Correctly parse HTTP response that doesn't contain an HTTP version with a decimal place:
The previous version would only match strings like
HTTP/2.0 307.