Support reponse forbidden better

This commit is contained in:
Joakim Erdfelt 2012-07-16 09:32:25 -07:00
parent fc658c3805
commit 5bf71f5125
2 changed files with 9 additions and 3 deletions

View File

@ -262,6 +262,9 @@ public class WebSocketAsyncConnection extends AbstractAsyncConnection implements
{
LOG.debug("onOpen()");
super.onOpen();
// TODO: websocket.setConnection(this);
// TODO: websocket.onConnect();
fillInterested();
}

View File

@ -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);