On 08/12/2014 22:43, Rémy Maucherat wrote:
> 2014-12-08 21:59 GMT+01:00 Mark Thomas <ma...@apache.org>:
> 
>> What triggers the exception. That is the bit I don't understand.
>>
> The test is throwing an exception, it goes to onError which writes a
> message, but the writer empty message gets sent first. From what I remember.
> 
> To go further in this discussion, please provide information on where the
> specification states empty messages are sent when using a writer or output
> stream.

Zero length messages are valid as per RFC 6455 and getSendWriter() is
for sending messages. There is no exclusion that I can see for zero
length messages.

So, I'd turn you question around and ask you to provide a reference that
requires special handling in a writer for a zero length message.

The TCK appears to be expecting that
Session.getBasicRemote().getSendWriter().close() is a NO-OP whereas I
would expect that to send a zero length message.

I'd also point out that (at least in Tomcat's implementation)
Session.getBasicRemote().getSendWriter();
Session.close();
does not send an empty message before the close message.

With your change currently in place it is now impossible to send a zero
length message using a Writer.

I'd prefer to see this commit reverted but, given your requirement for
an implementation that can pass the TCK - even if the TCK is wrong,
then I'd accept this behaviour being disabled by default and enabled by
yet another system property.

Mark


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

Reply via email to