You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Server.MaxConnsPerIP is set to a non-zero value, the server wraps every incoming connection to a perIPConn in acquirePerIPConn. perIPConn has the struct definition:
@tysg the simplest way is probably for RequestCtx.IsTLS to check for perIPConn like this example: https://play.golang.org/p/p6zHsqpKhyC
If you can make a pull request for this including the test from above that would be great! 🙏
Steps To Reproduce: See gofiber/fiber#1456
Description:
When
Server.MaxConnsPerIP
is set to a non-zero value, the server wraps every incoming connection to aperIPConn
inacquirePerIPConn
.perIPConn
has the struct definition:When a
tls.Conn
comes in,acquirePerIPConn
assigns thetls.Conn
to the fieldConn
in the return value, which restricts thetls.Conn
tonet.Conn
.fasthttp/peripconn.go
Lines 48 to 59 in 9466cd7
Therefore, the
IsTLS()
check onperIPConn
will fail, as it doesn't implement theconnTLSer
any more.fasthttp/server.go
Lines 709 to 720 in 9466cd7
Furthermore, adding the following failing test in
server_test.go
confirmed the discovery:The text was updated successfully, but these errors were encountered: