Hi, recently I've been trying to learn the module management.I want to get private module from my own repository. The repository only support HTTP request. I use nginx to proxy to the repository, and nginx listens port 443 and 80. When I try to execute "go get myrepo.com/myrepo", it gives me "404 not found", of cause I using GOINSECURE. My go version is 1.19, and system is windows 10. I find the source code in cmd/go/internal/web/http.go. In "func get(security SecurityMode, url *urlpkg.URL) (*Response, error)", firstly it try to use HTTPS to get mate. And if the response return nil, it will try to use HTTP to get mate. In my case, the response body which HTTPS returned is nginx's 404 page, it's not nil. So it will not try to use HTTP to get mate. I want to know why is it possible to determine the use of HTTP by relying on whether response is nil, rather than simultaneously determining the response status. Sorry for the poor expression, because I'm not good at English.
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/36dfc6b7-9efc-46de-ace3-1aac09515ea9n%40googlegroups.com.