websocket: Compressed messages fail in Safari

When Safari 13.1 for MacOS receives a compressed text message, it prints WebSocket connection to 'ws://localhost:8080/ws' failed: Could not decode a text frame as UTF-8 on the Javascript console and closes the WebSocket connection.

This is probably a bug in Safari. But this issue might help others to disable compression as a workaround. They have to pass AcceptOptions to Accept():

websocket.AcceptOptions{
	CompressionMode: websocket.CompressionDisabled,
}

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Sorry I don’t currently have the time to help debug, in the middle of closing a home, working a new job and moving.

But I’ve reopened this issue to investigate at some future date.