diff options
| author | Adnan Maolood <[email protected]> | 2021-02-23 17:27:54 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-23 17:29:50 -0500 |
| commit | c688defefda1cd8ebdde1d9359469f5b8daaa343 (patch) | |
| tree | cbaefee6e30f7dd4b4663df082316713e01a8b75 /server.go | |
| parent | response: Add Conn and TLS methods (diff) | |
| download | go-gemini-c688defefda1cd8ebdde1d9359469f5b8daaa343.tar.xz go-gemini-c688defefda1cd8ebdde1d9359469f5b8daaa343.zip | |
request: Add Conn and TLS methods
Diffstat (limited to 'server.go')
| -rw-r--r-- | server.go | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -366,16 +366,7 @@ func (srv *Server) serveConn(ctx context.Context, conn net.Conn) error { w.WriteHeader(StatusBadRequest, "Bad request") return w.Flush() } - - // Store the TLS connection state - if tlsConn, ok := conn.(*tls.Conn); ok { - state := tlsConn.ConnectionState() - req.TLS = &state - req.Host = state.ServerName - } - - // Store remote address - req.RemoteAddr = conn.RemoteAddr() + req.conn = conn h := srv.Handler if h == nil { |