Issue #207 - UntrustedWSServlet should have a slightly higher then default max message size

This commit is contained in:
Joakim Erdfelt 2017-05-11 13:26:03 -07:00
parent 2ed56d4142
commit 016cbfa5f4
1 changed files with 3 additions and 0 deletions

View File

@ -54,6 +54,9 @@ public class UntrustedWSServlet extends WebSocketServlet
{
WebSocketServerFactory serverFactory = (WebSocketServerFactory) factory;
serverFactory.setCreator(this.creator);
serverFactory.getPolicy().setMaxTextMessageSize(100 * 1024);
serverFactory.getPolicy().setMaxBinaryMessageSize(100 * 1024);
UntrustedWSSessionFactory sessionFactory = new UntrustedWSSessionFactory(serverFactory);
this.getServletContext().setAttribute(UntrustedWSSessionFactory.class.getName(), sessionFactory);
serverFactory.setSessionFactories(sessionFactory);