Skip to content

Commit

Permalink
Use Host instead of full URL
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Apr 14, 2022
1 parent 58ae015 commit 8869206
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/getproviders/registry_client.go
Expand Up @@ -437,7 +437,7 @@ func (c *registryClient) getFile(url *url.URL) ([]byte, error) {
defer resp.Body.Close()

if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("%s returned from %s", resp.Status, resp.Request.URL)
return nil, fmt.Errorf("%s returned from %s", resp.Status, resp.Request.Host)
}

data, err := ioutil.ReadAll(resp.Body)
Expand Down Expand Up @@ -478,7 +478,7 @@ func maxRetryErrorHandler(resp *http.Response, err error, numTries int) (*http.R
// both response and error.
var errMsg string
if resp != nil {
errMsg = fmt.Sprintf(": %s returned from %s", resp.Status, resp.Request.URL)
errMsg = fmt.Sprintf(": %s returned from %s", resp.Status, resp.Request.Host)
} else if err != nil {
errMsg = fmt.Sprintf(": %s", err)
}
Expand Down

0 comments on commit 8869206

Please sign in to comment.