Subject: [hybi] draft-07 support at websocketstest.com

From: Michael <[email-masked]>
Date: Sat, 14 May 2011 01:47:21 +0400

Hi All,

A websockets test server at http://websocketstest.com has been updated
to support hybi-draft-07!

The test page now includes several new tests specific to the latest draft:
* ping - sending a server side ping message and checking that the
browser responds back with a pong message
* fragments - sending a message to the server and receiving the same
message as a response in multiple fragments

The server was also tested to work with Andy Green's libwebsockets
library (ping, client and fraggle client tools), and draft-07 enabled
build of firefox mentioned in [0].

Some protocols that are especially useful for testing are built-in.

Protocols for libwebsocket tools:
* lws-mirror-protocol
* dumb-increment-protocol
* fraggle-protocol (server will close connection after 20 retries)

Test protocols described in[1]:
* org.ietf.websocket.test-echo-assemble
* org.ietf.websocket.test-echo-fragment
* org.ietf.websocket.test-produce

for the folks how want to run the tests using command line tools or
other clients, the address of the websocket endpoint is
ws://ws.websocketstest.com

deflate-stream extension is not yet supported (due to some server side
buffer management issues), but instead of the deflate-stream
extension, this server supports per-frame deflate extension draft
proposed by Tokeshi Yoshino [2], which, hopefully, will find its way
into a standard.

A client-side websocket library and some protocol tests created in the
process are available at [3].

Hope this will be helpful to other protocol implementors for
interoperability testing.

PS: I'm not sure if that was already mentioned before or not, but
07-draft has an error in section 4.4 Fragmentation
"As an example, for a text message sent as three fragments,
      the first fragment would have an opcode of 0x4 and a FIN bit
      clear, the second fragment would have an opcode of 0x0 and a FIN
      bit clear, and the third fragment would have an opcode of 0x0 and
      a FIN bit that is set."

But according to the section 4.6:
"Opcodes 0x3-0x7 are reserved for further non-control frames yet to be defined."

So, it seems there is a typo in the 4.4 and instead of 0x4 it should
be 0x1 (because the message in this example is text)

Thanks!
Michael

-----
0. http://www6.ietf.org/mail-archive/web/hybi/current/msg07362.html
1. http://www.ietf.org/mail-archive/web/hybi/current/msg06781.html
2. http://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-00
3. https://github.com/mplatov/ruby-websocket-client