summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Himpel <chressie@googlemail.com>2012-09-25 09:22:13 -0700
committerChristian Himpel <chressie@googlemail.com>2012-09-25 09:22:13 -0700
commiteaade06816cc5d61e9fc9c67f47428ef4f12eed1 (patch)
tree77dfda7efffa78366eb7f4964d5434ea697d34e0 /src
parent250a8442c98cb97e65dcef5ed4d4e56ac0f710a5 (diff)
downloadgo-eaade06816cc5d61e9fc9c67f47428ef4f12eed1.tar.gz
net/http: use tls host instead of proxy, when checking against a certificate
Fixes issue 4152. R=bradfitz CC=golang-dev http://codereview.appspot.com/6570045 Committer: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/pkg/net/http/transport.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/net/http/transport.go b/src/pkg/net/http/transport.go
index a33d787f2..651f3ce00 100644
--- a/src/pkg/net/http/transport.go
+++ b/src/pkg/net/http/transport.go
@@ -381,7 +381,7 @@ func (t *Transport) getConn(cm *connectMethod) (*persistConn, error) {
// Initiate TLS and check remote host name against certificate.
cfg := t.TLSClientConfig
if cfg == nil || cfg.ServerName == "" {
- host, _, _ := net.SplitHostPort(cm.addr())
+ host := cm.tlsHost()
if cfg == nil {
cfg = &tls.Config{ServerName: host}
} else {