Merge pull request #572 from stevvooe/fetcher-concurrency-bug

cmd/dist/fetch: address subtle concurrency bug
This commit is contained in:
Stephen Day 2017-02-24 18:41:38 -08:00 committed by GitHub
commit c2c057a5db
1 changed files with 3 additions and 3 deletions

6
cmd/dist/fetch.go vendored
View File

@ -139,11 +139,11 @@ func getResolver(ctx contextpkg.Context) (remotes.Resolver, error) {
}
for _, path := range paths {
base.Path = path
url := base.String()
url := base
url.Path = path
log.G(ctx).WithField("url", url).Debug("fetch content")
req, err := http.NewRequest(http.MethodGet, url, nil)
req, err := http.NewRequest(http.MethodGet, url.String(), nil)
if err != nil {
return nil, err
}