Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 245cfe7

Browse files
authored
fix duplicate port in the redirect url
1 parent d88a644 commit 245cfe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plumbing/transport/http/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (s *session) ModifyEndpointIfRedirect(res *http.Response) {
152152
}
153153

154154
s.endpoint.Protocol = r.URL.Scheme
155-
s.endpoint.Host = r.URL.Host
155+
s.endpoint.Host = r.URL.Hostname()
156156
s.endpoint.Port, _ = strconv.Atoi(r.URL.Port())
157157
s.endpoint.Path = r.URL.Path[:len(r.URL.Path)-len(infoRefsPath)]
158158
}

0 commit comments

Comments
 (0)