Skip to content

Commit 2f08560

Browse files
add nil check on proxy user
1 parent 00bec2d commit 2f08560

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

https.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ func httpsProxyAddr(reqURL *url.URL, httpsProxy string) (string, error) {
617617
}
618618

619619
hostname := proxyURL.Hostname()
620-
if proxyURL.User.String() != "" {
620+
if proxyURL.User != nil && proxyURL.User.String() != "" {
621621
hostname = proxyURL.User.String() + "@" + hostname
622622
}
623623

0 commit comments

Comments
 (0)