New issue
Advanced search Search tips

Issue 687378 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

WebSocket data using per message deflate arrives as garbage

Reported by phobos...@gmail.com, Jan 31 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36

Steps to reproduce the problem:
1. Visit http://phoboslab.org/files/bugs/node-ws/
2. The 2nd line the textarea will read "Fail: data at 0 is 66 (received 4 bytes)"

What is the expected behavior?
2nd line in the textarea should read "Succes: all zeroes (received 16 bytes)"

What went wrong?
A WebSocket server sends out 3 message with raw bytes, all 0, using per message deflate. The messages vary in size (32768, 16, 32768 bytes). The 2nd message arrives as garbage.

The test case reliably fails in Chrome & Firefox but works without any problems in Edge and Safari. So I'm not really sure if this is an issue with the WebSocket server or browsers. Are Chrome & Firefox using the same libs for deflate?

Firefox 51 Windows & OSX: fail
Chrome 56 Windows & OSX: fail
Safari 10 OSX: success
Edge Windows: success

Chrome version: 56.0.2924.76  Channel: stable
OS Version: OS X 10.12.2
Flash Version: Shockwave Flash 24.0 r0

 

Comment 1 by phobos...@gmail.com, Jan 31 2017

Upon further investigation, this bug seems to appear when an uncompressed message is sandwiched in between two compressed messages. Seems likely this a bug in Chrome & Firefox, not the server software.

Setting the compression threshold in the server software to `0` OR to `40000` (causing none or all of the 3 messages to be compressed) will not cause this bug.
Labels: Needs-Triage-M56
Well, it was a bug in the server after all: https://github.com/websockets/ws/issues/983#issuecomment-276587439
Status: WontFix (was: Unconfirmed)

Sign in to add a comment