On 25/01/2017 20:53, Preston Price wrote:
> Is it possible to use a Decoder to handle partial websocket messages?

No. Decoders only apply to whole messages.

The closest you will get it is:
- remove the message size limit
- use a partial message handler that buffers up to a limit
- discard data once the buffer limit is exceeded
- ignore messages that exceed the buffer

This makes the application vulnerable to a DoS via very large messages
unless there is some high limit than the buffer limit enforced.

Mark

> 
> On Wed, Jan 25, 2017 at 1:29 PM, Mark Thomas <ma...@apache.org> wrote:
> 
>> On 25/01/2017 20:25, Preston Price wrote:
>>> My environment:
>>> java: 1.8.0_102,
>>> tomcat: 8.0.39,
>>> os:Ubuntu 4.4.0-45-generic,
>>> websocket api: 1.1
>>>
>>> Currently in my application clients will (rarely) send a message that
>>> exceeds the default (8192 byte) limit for messages. This results in the
>>> socket being closed by the server with a 1009 code (too big). Can tomcat
>> be
>>> configured to ignore such large messages without closing the socket?
>>
>> No.
>>
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to