Issue #1569 - relaxing WebSocketPolicy.setMax*MessageSize checks
+ Allow setting of the max (binary|text) message size to -1 to have unconstrained message sizes. + Disconnect message size from buffer size in JSR356 Session calls
This commit is contained in:
parent
8d21193931
commit
8ca70c691c
|
@ -328,7 +328,6 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess
|
|||
@Override
|
||||
public void setMaxBinaryMessageBufferSize(int length)
|
||||
{
|
||||
getPolicy().setMaxBinaryMessageSize(length);
|
||||
getPolicy().setMaxBinaryMessageBufferSize(length);
|
||||
}
|
||||
|
||||
|
@ -342,7 +341,6 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess
|
|||
@Override
|
||||
public void setMaxTextMessageBufferSize(int length)
|
||||
{
|
||||
getPolicy().setMaxTextMessageSize(length);
|
||||
getPolicy().setMaxTextMessageBufferSize(length);
|
||||
}
|
||||
|
||||
|
|
|
@ -273,9 +273,6 @@ public class WebSocketPolicy
|
|||
public void setInputBufferSize(int size)
|
||||
{
|
||||
assertGreaterThan("InputBufferSize",size,1);
|
||||
assertLessThan("InputBufferSize",size,"MaxTextMessageBufferSize",maxTextMessageBufferSize);
|
||||
assertLessThan("InputBufferSize",size,"MaxBinaryMessageBufferSize",maxBinaryMessageBufferSize);
|
||||
|
||||
this.inputBufferSize = size;
|
||||
}
|
||||
|
||||
|
@ -304,7 +301,7 @@ public class WebSocketPolicy
|
|||
*/
|
||||
public void setMaxBinaryMessageSize(int size)
|
||||
{
|
||||
assertGreaterThan("MaxBinaryMessageSize",size,1);
|
||||
assertGreaterThan("MaxBinaryMessageSize",size,-1);
|
||||
|
||||
this.maxBinaryMessageSize = size;
|
||||
}
|
||||
|
@ -334,7 +331,7 @@ public class WebSocketPolicy
|
|||
*/
|
||||
public void setMaxTextMessageSize(int size)
|
||||
{
|
||||
assertGreaterThan("MaxTextMessageSize",size,1);
|
||||
assertGreaterThan("MaxTextMessageSize",size,-1);
|
||||
|
||||
this.maxTextMessageSize = size;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue