Skip to content

Commit bd2272a

Browse files
authored
Use DefaultClient if given nil HTTPClient (#226)
1 parent e2366bb commit bd2272a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/awsauth/settings.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ func (s Settings) WithHTTPClient() LoadOptionsFunc {
181181
if s.HTTPClient != nil {
182182
options.HTTPClient = s.HTTPClient
183183
}
184+
if options.HTTPClient == nil {
185+
options.HTTPClient = http.DefaultClient
186+
}
184187
if s.ProxyOptions != nil {
185188
if client, ok := options.HTTPClient.(*http.Client); ok {
186189
if client.Transport == nil {

0 commit comments

Comments
 (0)