You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending WebSocket close frames with a description field, Chrome and Brave browsers receive malformed data, while Firefox handles it correctly. The malformation is inconsistent but appears to be related to the close frame's description field encoding.
- This one has spaces at the start which makes the response a invalid json
Firefox(no malformed data):
Observe in Chrome/Brave:
Malformed data appears: [malformed] 464b85aa11a4e270e81866] Search completed...
Issue is inconsistent but reproducible
Firefox receives frames correctly
Current Workaround
Skipping the description field in close frames resolves the issue:
session.close(Some(CloseReason{code:CloseCode::Normal,description:None// Skip description to avoid malformation})).await
Environment
actix-ws: 0.2.5
Chrome/Brave (Chromium-based browsers)
The text was updated successfully, but these errors were encountered:
Loaki07
changed the title
Close frame description causes frame malformation in Chrome/Brave WebSocket clients
actix-ws: Web socket Close frame description causes frame malformation in Chrome/Brave WebSocket clients
Mar 3, 2025
Description
When sending WebSocket close frames with a description field, Chrome and Brave browsers receive malformed data, while Firefox handles it correctly. The malformation is inconsistent but appears to be related to the close frame's description field encoding.
Reproduction
Chrome (has malformed data):
Firefox(no malformed data):
[malformed] 464b85aa11a4e270e81866] Search completed...
Current Workaround
Skipping the description field in close frames resolves the issue:
Environment
The text was updated successfully, but these errors were encountered: