// Calls the protocol handler's init method if the request is marked to be upgraded
if (request instanceof org.apache.catalina.connector.Request) {
org.apache.catalina.connector.Request req = (org.apache.catalina.connector.Request) request;
if (req.isUpgrade()) {
ProtocolHandler handler = req.getProtocolHandler();
if (handler != null) {
handler.init(
new WebConnectionImpl(
req.getInputStream(),
((org.apache.catalina.connector.Response)req.getResponse()).getOutputStream()));
} else {
log.log(Level.SEVERE, sm.getString("standardPipeline.protocolHandler.required"));