diff --git a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java index f455a6576f8..ee664fb3817 100644 --- a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java +++ b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java @@ -262,6 +262,9 @@ public class WebSocketAsyncConnection extends AbstractAsyncConnection implements { LOG.debug("onOpen()"); super.onOpen(); + // TODO: websocket.setConnection(this); + // TODO: websocket.onConnect(); + fillInterested(); } diff --git a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java index 97bcd88c1a5..15d233dc908 100644 --- a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java +++ b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java @@ -119,7 +119,12 @@ public class WebSocketServerFactory extends AbstractLifeCycle implements WebSock WebSocketCreator creator = getCreator(); Object websocketPojo = creator.createWebSocket(sockreq,sockresp); - // TODO: Handle forbidden? + + // Handle response forbidden (and similar paths) + if (sockresp.isCommitted()) + { + return false; + } if (websocketPojo == null) { @@ -128,8 +133,6 @@ public class WebSocketServerFactory extends AbstractLifeCycle implements WebSock return false; } - // TODO: discover type, create proxy - // Send the upgrade WebSocketPolicy objPolicy = this.basePolicy.clonePolicy(); WebSocketEventDriver websocket = new WebSocketEventDriver(websocketPojo,methodsCache,objPolicy,bufferPool);