Used the WebSocket-Node library in node.js to write a test server with matching client to test receiving fragmented messages of various sizes.
There is a matching node.js console client that works fine.
Tested against Aurora 7.0a2
Test server can be obtained by cloning the WebSocket-Node git repo:
Once the server is running, point Aurora 7 to http://localhost:8080
Once connected, the browser should continually print out messages indicating that it received increasingly larger messages until the user disconnects or a limitation is reached (i.e. the aggregate message size is too large)
Firefox will drop the connection and emit an 'error' event from the websocket object on messages that roughly exceed 25,000 bytes. The threshold of message size that triggers the problem is not entirely consistent, but usually seems to be roughly around 25,000 bytes. However sometimes it will remain stable for messages up to 100,000 bytes.
Behavior can be compared against the console-mode fragmentation-test-client.js implementation.
The node.js test client and server were run against node v0.4.9
Also, when Aurora drops the connection, it does not first send a close frame with the expected error code. It just instantly closes the underlying TCP socket.
I would expect it to send one of the following error codes to the server before closing the socket:
1002 - Protocol Error
1004 - Message Too Large
Brian, You win a special award of some kind for best test case. If we had such a thing :)
The issue here is a "shift the accumulation buffer" optimization that none of the other fragment test cases have managed to hit. Thanks! It can result in fragmented parts of the message being lost, which resulted in the failure.
Created attachment 546774 [details] [diff] [review]
Created attachment 546776 [details] [diff] [review]
forgot to put a comment in the obsoleted patch. code content is the same.
A special award? I'm glad I could be helpful!
Oh I should mention that I strongly suspect this bug also affects the current Firefox 6 beta. I didn't write exhaustive test code for it though because Fx6 implements draft-07 and my code has all been updated for draft-09. But I did fire up the draft-07 branch of my code to try something against Fx6 and experienced the same problem that originally caused me to look into this issue for Fx7.
*** Bug 690703 has been marked as a duplicate of this bug. ***
*** Bug 691733 has been marked as a duplicate of this bug. ***
The early bird cathes the worm :)
I'll continue testing on FF8.