aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/http/server.go')
-rw-r--r--src/pkg/http/server.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/pkg/http/server.go b/src/pkg/http/server.go
index 654af378a1..6be3611f0f 100644
--- a/src/pkg/http/server.go
+++ b/src/pkg/http/server.go
@@ -178,13 +178,6 @@ func (srv *Server) newConn(rwc net.Conn) (c *conn, err os.Error) {
br := bufio.NewReader(c.lr)
bw := bufio.NewWriter(rwc)
c.buf = bufio.NewReadWriter(br, bw)
-
- if tlsConn, ok := rwc.(*tls.Conn); ok {
- tlsConn.Handshake()
- c.tlsState = new(tls.ConnectionState)
- *c.tlsState = tlsConn.ConnectionState()
- }
-
return c, nil
}
@@ -562,6 +555,12 @@ func (c *conn) serve() {
log.Print(buf.String())
}()
+ if tlsConn, ok := c.rwc.(*tls.Conn); ok {
+ tlsConn.Handshake()
+ c.tlsState = new(tls.ConnectionState)
+ *c.tlsState = tlsConn.ConnectionState()
+ }
+
for {
w, err := c.readRequest()
if err != nil {