aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-23 17:27:54 -0500
committerAdnan Maolood <[email protected]>2021-02-23 17:29:50 -0500
commitc688defefda1cd8ebdde1d9359469f5b8daaa343 (patch)
treecbaefee6e30f7dd4b4663df082316713e01a8b75 /server.go
parentresponse: Add Conn and TLS methods (diff)
downloadgo-gemini-c688defefda1cd8ebdde1d9359469f5b8daaa343.tar.xz
go-gemini-c688defefda1cd8ebdde1d9359469f5b8daaa343.zip
request: Add Conn and TLS methods
Diffstat (limited to 'server.go')
-rw-r--r--server.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/server.go b/server.go
index d577c97..b5c61cf 100644
--- a/server.go
+++ b/server.go
@@ -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 {