0

I tried to passed a JSON via websocket to a html GUI. When size is upper than 32768 bytes, chrome raises this exception:

WebSocket connection to 'ws://localhost:8089/events/' failed: Received a frame that sets compressed bit while another decompression is ongoing

on the line where WebSocket is instantiated :

this._websocket = new WebSocket(url); 

However it work fine on firefox. I used jetty 9.1.3 on server side and I tried with chrome 33 and 34 beta.

I forget to precise that if I send length message superior than 32768 bytes, on chrome's network debugging tools, it show 32768 bytes length instead of real message length.

Any ideas ?

1

2 Answers 2

2

When using Jetty 9.1.2.v20140210 I don't have any problems with the connection, but with the later 9.1.3.v20140225 version it fails and I get the error using Opera or Chrome. Firefox works fine on all versions.

I submitted a bug report to Jetty about this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=431459

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, I bumped into the same problem and the older version works for me too.
It is the same to us. We are specified 9.1.2.v20140210 on pom.xml and all work again.
1

This might be a bug in Jetty.

permessage-deflate requires the compression bit be set on the first frame of a fragmented message - and only on that.

It might be that Jetty fragments outgoing message to 32k fragments, and sets the compression bit on all frames. If so, that's a bug.

I have just tested current Chrome 33 using Autobahn|Testsuite: everything works as expected .. including messages with 128k.

You can test Jetty using above testsuite. It'll catch the bug if there is one.

2 Comments

Of course you're right, I tried with jetty 9.1.2 and it's work fine with both chrome and firefox. I have not tried to determine if as you said, there is 1 compression bit per fragment. Thanks for your answer
Chrome 33 and 34 pass deflate-frame extension too, it could also be a bug in that extension.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.