diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2011-06-27 10:37:33 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2011-06-27 10:37:33 -0700 |
| commit | 7e29f1add8a4cebf533a70236fd1c9c0b21c1a9a (patch) | |
| tree | 8cc246bad606333f560c02e8a7c7e5e1a3627c49 /src/pkg/http/server.go | |
| parent | 9843ca5e2bb1a3b5ab76348cde006705c1a695d9 (diff) | |
| download | go-7e29f1add8a4cebf533a70236fd1c9c0b21c1a9a.tar.xz | |
http: do TLS handshake explicitly before copying TLS state
Previously we were snapshotting the TLS state into *Request
before we did the HTTP ReadRequest, the first Read of which
triggered the TLS handshake implicitly.
Fixes #1956
R=golang-dev, rsc
CC=agl, golang-dev
https://golang.org/cl/4630072
Diffstat (limited to 'src/pkg/http/server.go')
| -rw-r--r-- | src/pkg/http/server.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/http/server.go b/src/pkg/http/server.go index 7f1b8a2bcc..03b9cd86f6 100644 --- a/src/pkg/http/server.go +++ b/src/pkg/http/server.go @@ -152,6 +152,7 @@ func newConn(rwc net.Conn, handler Handler) (c *conn, err os.Error) { c.buf = bufio.NewReadWriter(br, bw) if tlsConn, ok := rwc.(*tls.Conn); ok { + tlsConn.Handshake() c.tlsState = new(tls.ConnectionState) *c.tlsState = tlsConn.ConnectionState() } |
