Hi Pawel,

> Try capturing the traffic (with Wireshark, etc) for the broken connection 
> against Tomcat, and then also to the "working" Python server, at least what 
> are the differences on the wire.
> That would probably help identify the problem a lot faster.

I attached screenshots from Wireshark capturing three scenarios:
* tomcat-safari.png (triggers the issue)
* tomcat-chrome.png (does not trigger the issue)
* python-safari.png (does not trigger the issue)

I am no expert in low-level  WebSocket communication, but it looks like Safari 
has an issue with Tomcat splitting the message into frames.

Beste regards,
Florian



-----Original Message-----
From: Pawel Veselov <pawel.vese...@gmail.com> 
Sent: Dienstag, 3. Mai 2022 18:20
To: Hagenauer, Florian <florian.hagena...@siemens-healthineers.com>
Cc: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: Tomcat + Safari WebSocket issue

Florian,

On Tue, May 3, 2022 at 3:12 PM Hagenauer, Florian 
<florian.hagena...@siemens-healthineers.com> wrote:
> since Apple released Safari 15 (both iOS and macOS) I am running into a 
> strange issue related to Apache Tomcat, Safari/WebKit and certain sequences 
> of messages received via a WebSocket. When the browser receives messages in 
> this order, the connection gets closed.
>
> The following sequence triggers the issue:
> 1. Connect from Safari to a Tomcat WebSocket server and use the 
> 'permessage-deflate' extension 2. Receive a text message from the 
> WebSocket server 3. Receive a large binary message from the server 4. 
> The WebSocket connection is closed with the close code PROTOCOL_ERROR.

Try capturing the traffic (with Wireshark, etc) for the broken connection 
against Tomcat, and then also to the "working" Python server, at least what are 
the differences on the wire.
That would probably help identify the problem a lot faster.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to