[Evil Proxy] Messages may not not broadcasted when long-polling reconnects and proxy close the connection #1459
Closed
Description
Messages are not broadcasted to the browser when long-polling reconnects after the connection is closed by remote timeout (for example by an intermediary proxy).
To reproduce the problem:
- Make following changes to atmosphere-chat sample:
- force transport to long-polling
- comment the following line in the onClose event:
subSocket.push(atmosphere.util.stringifyJSON({ author: author, message: 'disconnecting' }));
-
Deploy atmosphere-chat on Tomcat (7.0.47+)
-
Configure an Apache httpd server as reverse proxy adding the following lines:
ProxyTimeout 30
ProxyPass /atmosphere-chat ajp://localhost:8009/atmosphere-chat -
Open the chat application on the browser passing for the port 80 (i.e. using apache as reverse proxy)
-
Start the chat and then stop sending messages for 30 seconds
-
When the chat application reconnects try to send a message (it will not receive it back)