stomp-js / stompjs

Javascript and Typescript Stomp client for Web browsers and node.js apps
Apache License 2.0
776 stars 81 forks source link

macos Safari 16.5.2 failed to receive binary stomp body but chrome success #563

Closed linsmalldragon closed 7 months ago

linsmalldragon commented 1 year ago

macos Safari 16.5.2 failed to receive binary stomp message, It's all ok in chrome to receive it. So what's the probem?

The spring boot server can send text message to safari successfully. But if use send binary array message, safari failed but chrome is success. I use spring boot rabbitmq relay websocket. All is ok in Chrome. So any difference in chrome and safari?

image

image

kum-deepak commented 1 year ago

The automated test suits are executed on Safari on OSX as well. I have rerun the test suite today (https://github.com/stomp-js/stompjs/actions/runs/5612796077/job/15207364810), and it succeeds. The test suit has test cases for binary payloads (https://github.com/stomp-js/stompjs/blob/develop/spec/unit/message.spec.js). The test suit uses RabbitMQ.

It might be an issue specific to your setup or an issue with the version of Safari you are testing aginst.

davidtinker commented 2 months ago

I have run into the same issue with Safari 17.2.1 also using Spring Boot. It seems binary messages longer than about 8k fail. Works fine in Chrome. Safari just closes the WebSocket.

davidtinker commented 2 months ago

I figured out my issue. I was sending data compressed with deflate in my message payload. If I send uncompressed data it works. My server (Tomcat) is compressing the data anyway so I have gone with that. It seems the "double deflated" data somehow causes an issue with Safari.