Skip to content

Commit

Permalink
add nil check on proxy user
Browse files Browse the repository at this point in the history
  • Loading branch information
pspieker-stripe committed Jul 10, 2024
1 parent 00bec2d commit 2f08560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion https.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ func httpsProxyAddr(reqURL *url.URL, httpsProxy string) (string, error) {
}

hostname := proxyURL.Hostname()
if proxyURL.User.String() != "" {
if proxyURL.User != nil && proxyURL.User.String() != "" {
hostname = proxyURL.User.String() + "@" + hostname
}

Expand Down

0 comments on commit 2f08560

Please sign in to comment.