modprox / mp

Private Go Module Proxy
https://modprox.org
BSD 3-Clause "New" or "Revised" License
16 stars 1 forks source link

proxy: downloader client must follow HTTP redirects #140

Open shoenig opened 5 years ago

shoenig commented 5 years ago

If a go-get redirecting domain itself incurs a normal HTTP redirect, the client fails to follow that redirect first

$ curl -v https://gonum.org/v1/netlib 2>/dev/null | grep Redir
Redirecting to https://www.gonum.org/v1/netlib
$ curl -s $GOPROXY/v1/problems/downloads | jq -r '.[] | select(.module.source=="gonum.org/v1/netlib")'
{
  "module": {
    "source": "gonum.org/v1/netlib",
    "version": "v0.0.0-20190313105609-8cb42192e0e0"
  },
  "time": "2019-06-18T16:56:17.740030207-05:00",
  "message": "no path transformation exists for domain gonum.org"
}
{
  "module": {
    "source": "gonum.org/v1/netlib",
    "version": "v0.0.0-20190331212654-76723241ea4e"
  },
  "time": "2019-06-18T16:56:17.826079531-05:00",
  "message": "no path transformation exists for domain gonum.org"
}