Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: SUMDB detection from GOPROXY fails when GOPROXY is a file URL #32227
I believe this is the root cause of the symptom reported in #32216.
Since the sum database requires an HTTPS transport, we should probably default it to either
To clarify, it's not trying to derive the GOSUMDB setting so much as the connection transport for getting to it.
I think we do want file:// proxies to be able to provide GOSUMDB files, since the checksum database is (or can be) a static file tree too. But when it does try the file URL, it needs to get a 404 from the sumdb/supported endpoint, so that it can fall back to the next thing it would normally try (probably a direct connection).
So I think we just need to make the checksum fetches use the same access mechanism that the proxy fetches do, so that file:// is implemented during that fetch, and we also need to make sure that the response is a not-found, but that seems like it will work OK, since it is already using errors.Is(err, os.ErrNotExist).