diff options
| author | Bryan C. Mills <bcmills@google.com> | 2019-09-05 14:27:27 -0400 |
|---|---|---|
| committer | Bryan C. Mills <bcmills@google.com> | 2019-09-11 14:02:43 +0000 |
| commit | f6c691e0e1b1434a02301c39e6d66e21699a98a8 (patch) | |
| tree | e77778051b70021504b03bf5bfa574bbb5d7a78f /src/encoding/json/encode.go | |
| parent | 0e015e20cfe7265635af605d274ff8dc2de5b3a2 (diff) | |
| download | go-f6c691e0e1b1434a02301c39e6d66e21699a98a8.tar.xz | |
cmd/go/internal/modfetch/codehost: treat nonexistent repositories as “not found”
If a go-import directive refers to a nonexistent repository, today we
treat that as an error fetching a module that actually exists.
That makes the HTTP server responsible for determining which
repositories do or do not exist, which may in general depend on
the user's separately-stored credentials, and imposes significant
complexity on such a server, which can otherwise be very simple.
Instead, check the repository URL and/or error message to try to
determine whether the repository exists at all. If the repo does not
exist, treat its absence as a “not found” error — as if the server had
not returned it in the first place.
Updates #34094
Change-Id: I142619ff43b96d0de428cdd0b01cca828c9ba234
Reviewed-on: https://go-review.googlesource.com/c/go/+/194561
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions
