475209 - WebSocketServerFactory should not hand null object to DecoratedObjectFactory

This commit is contained in:
Joakim Erdfelt 2015-08-27 15:36:57 -07:00
parent 5312f2c0d7
commit 6fad345161
1 changed files with 3 additions and 1 deletions

View File

@ -172,7 +172,6 @@ public class WebSocketServerFactory extends ContainerLifeCycle implements WebSoc
ServletUpgradeResponse sockresp = new ServletUpgradeResponse(response);
Object websocketPojo = creator.createWebSocket(sockreq, sockresp);
websocketPojo = getObjectFactory().decorate(websocketPojo);
// Handle response forbidden (and similar paths)
if (sockresp.isCommitted())
@ -187,6 +186,9 @@ public class WebSocketServerFactory extends ContainerLifeCycle implements WebSoc
return false;
}
// Allow Decorators to do their thing
websocketPojo = getObjectFactory().decorate(websocketPojo);
// Get the original HTTPConnection
HttpConnection connection = (HttpConnection)request.getAttribute("org.eclipse.jetty.server.HttpConnection");