Skip to content

Dockerfile: Windows: update Golang download domains to cut down redirects#46324

Merged
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:hack_less_redirects
Aug 25, 2023
Merged

Dockerfile: Windows: update Golang download domains to cut down redirects#46324
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:hack_less_redirects

Conversation

@thaJeztah
Copy link
Member

hack: update link to GOPATH documentation

This documentation moved to a different page, and the Go documentation
moved to the https://go.dev/ domain.

Dockerfile: Windows: update Golang download domains to cut down redirects

The golang.org domain moved to go.dev, and the download-URLs we were
using resulted in 2 redirects;

curl -sI https://golang.org/dl/go1.20.windows-amd64.zip | grep 'location'
location: https://go.dev/dl/go1.20.windows-amd64.zip

curl -sI https://go.dev/dl/go1.20.windows-amd64.zip | grep 'location'
location: https://dl.google.com/go/go1.20.windows-amd64.zip

curl -sI https://dl.google.com/go/go1.20.windows-amd64.zip
HTTP/2 200
# ...

This patch cuts it down to one redirects. I decided not to use the "final"
(dl.google.com) URL, because that URL is not documented in the Golang docs,
and visiting the domain itself (https://dl.google.com/) redirects to a marketing
page for "Google Chrome".

Trying the /go/ path (https://dl.google.com/go/) also does not show a landing
page that lists downloads, so I'm considering those URLs to be "unstable".

- A picture of a cute animal (not mandatory but encouraged)

This documentation moved to a different page, and the Go documentation
moved to the https://go.dev/ domain.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
…ects

The `golang.org` domain moved to `go.dev`, and the download-URLs we were
using resulted in 2 redirects;

    curl -sI https://golang.org/dl/go1.20.windows-amd64.zip | grep 'location'
    location: https://go.dev/dl/go1.20.windows-amd64.zip

    curl -sI https://go.dev/dl/go1.20.windows-amd64.zip | grep 'location'
    location: https://dl.google.com/go/go1.20.windows-amd64.zip

    curl -sI https://dl.google.com/go/go1.20.windows-amd64.zip
    HTTP/2 200
    # ...

This patch cuts it down to one redirects. I decided not to use the "final"
(`dl.google.com`) URL, because that URL is not documented in the Golang docs,
and visiting the domain itself (https://dl.google.com/) redirects to a marketing
page for "Google Chrome".

Trying the `/go/` path (https://dl.google.com/go/) also does not show a landing
page that lists downloads, so I'm considering those URLs to be "unstable".

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants