Clients may hang when trying to use stream compression
Description
Due to a timing issue clients may appear hanged. The problem is that the server is sending a "go ahead and use compression" to the client and before the server adds the compression filter the client may have already sent compressed data so the server fails to interpret it and stays in a "hang state".
Solution without modifying MINA: Add the compression filter before giving the "go ahead" signal but only compress incoming traffic, send the "go ahead" and then enable compression of outgoing traffic.
Due to a timing issue clients may appear hanged. The problem is that the server is sending a "go ahead and use compression" to the client and before the server adds the compression filter the client may have already sent compressed data so the server fails to interpret it and stays in a "hang state".
Solution without modifying MINA: Add the compression filter before giving the "go ahead" signal but only compress incoming traffic, send the "go ahead" and then enable compression of outgoing traffic.
Thanks to Jakob Schröter