You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Harshad Vaishampayan <vm...@gmail.com> on 2015/11/11 06:15:29 UTC

Header value buffer size

Hi,

While creating a web socket connection using WsWebSocketContainer, I
encountered a siguation where I had to add a header more than 5000 bytes.
This resulted in a BufferOverflowException.

On clecking, I found that the following line in WsWebSocketContainer.java
    ByteBuffer result = ByteBuffer.allocate(4 * 1024);
limits the header value to be 4KB. However, seems most servers (including
Tomcat) should support headers upto 8KB.

Hence, requesting the line be modified to allow 8KB buffers.
Thanks.

-- 
Harshad Vaishampayan