Related to #29434, the Jakarta WebSocket API 2.1 introduces a standard mechanism for performing a WebSocket protocol upgrade. While we can use that upgradeHttpToWebSocket
method on Tomcat's implementation in TomcatRequestUpgradeStrategy
(as per #29434 for compatibility with Tomcat 10.0), we can also introduce a new StandardWebSocketUpgradeStrategy
which can use the upgradeHttpToWebSocket
method on the Jakarta WebSocket 2.1 ServerContainer
interface - and be chosen in AbstractHandshakeHandler
when no specific server API has been discovered.