Hi Mark,

> -----Original Message-----
> From: Mark Thomas [mailto:ma...@apache.org]
> Sent: Sunday, October 6, 2013 5:42 PM
> To: Tomcat Developers List
> Subject: Re: 8.0.x / 7.0.x progress
> 
> On 06/10/2013 02:57, Konstantin Preißer wrote:
> 
> > These errors seem to be introduced with r1529537 [2], as I get these errors
> with that revision, but with the previous one (r1529536) it works fine.
> 
> That patch is causing other problems too. Time to revert and re-think.

Thanks, after r1529697 the problems do not occur any more.

Unfortunately, I got another problem with websockets:
While trying to debug an issue where Tomcat seemed to corrupt binary websocket 
messages that excess a specific size (which happened with NIO but not with 
BIO), I tried to modify the Echo example so that it reads a string message, 
decode it as Base64 and send it back as binary message.

However, it seems when the websocket message is greater than ~ 8 KB (perhaps 
the value of org.apache.tomcat.websocket.textBufferSize) then Tomcat does not 
call the @OnMessage method, and sometimes it closes the websocket connection. 
This happens for BIO and NIO (I haven't checked with APR).
The Javadoc for @OnMessage says that for "maxMessageSize" element: "Specifies 
the maximum size of message in bytes that the method this annotates will be 
able to process, or -1 to indicate that there is no maximum. The default is -1."
So, normally Tomcat should be able to receive such large messages, right?

To reproduce:
1) Start Tomcat (current trunk) with NIO or BIO connector on 64-bit Windows 
with 64-bit Java 7.
2) Open the Chat example (http://localhost:8080/examples/websocket/chat.xhtml) 
with Firefox or IE. When you enter short messages they will be properly sent 
back to you.
3) Now construct a string that has 10000 characers and enter it in the chat 
type box. Tomcat will not send back that string. When debugging, you will 
notice that Tomcat does not call the OnMessage method. (I verified that the 
browser does send the message to Tomcat.)
4) Sometimes Tomcat now closes the connection. If it doesn't and you continue 
to send short messages Tomcat will also not be able to receive them.

I also added an @OnError method to the chat example with t.printStackTrace() 
but no stacktrace showed up in the console.

Would this be a bug?


Thanks!

Regards,
Konstantin Preißer


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

Reply via email to