Mantis - Resin
Viewing Issue Advanced Details
5394 minor always 03-13-13 11:46 04-16-13 10:52
cowan  
ferg  
high  
closed 4.0.35  
fixed  
none    
none 4.0.36  
0005394: java.lang.IllegalStateException in WebSocketOutputStream.fillHeader
When writing a large amount of data, WebSocketOutputStream.write(data, 0, data.length) throws java.lang.IllegalStateException.

java.lang.IllegalStateException
       at com.caucho.remote.websocket.WebSocketOutputStream.fillHeader(WebSocketOutputStream.java:236)
       at com.caucho.remote.websocket.WebSocketOutputStream.write(WebSocketOutputStream.java:125)
       at java.io.OutputStream.write(OutputStream.java:75)
       at java_io_OutputStream$write.call(Unknown Source)
Rep by S. Zachariadis

Notes
(0006221)
cowan   
03-15-13 08:21   
hmtp/11e1
(0006222)
cowan   
03-15-13 08:25   
WebSocketOutputStream.write is using 0x10000 as max message size but it should be 0xffff. With this fix outpstream writes the multi-part message properly, but there still seems to be a bug in the inputstream. It appears to do only a single read of size less than 0xffff, despite the header indicating there are more than 0xffff bytes to read.