Open justinmann opened 5 months ago
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.73.8. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
I am not sure this is violation of the RFC: rfc-editor.org/rfc/rfc6455
Can you point specifically to what in the RFC we're violating?
As I stated above, I am not sure this is an RFC violation, it is just does not match the convention used by other WebSocket client libraries (including the iOS library for React-Native).
I believe this is relevant RFC: https://www.rfc-editor.org/rfc/rfc2616#section-4.2 "Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma."
The RFC seems to be more of a suggestion and it just says to use a "," but makes no mention of adding a space ", ".
The RFC seems to be more of a suggestion and it just says to use a "," but makes no mention of adding a space ", ".
Yeah this is a bit of a weak statement. If you could provide more evidence that adding a space after the ,
is breaking the specs we could potentially change it.
Description
Here is the protocol string concat for Android: https://github.com/zxcpoiu/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java#L110
Here is the same logic from a Websocket library: https://github.com/theturtle32/WebSocket-Node/blob/master/lib/WebSocketClient.js#L200C53-L200C62****
I am not sure this is violation of the RFC: https://www.rfc-editor.org/rfc/rfc6455
Because it is not conventional, it does break some servers. Specifically the Deepgram Websocket Server fails on Android, but works on iOS.
Steps to reproduce
yarn run
React Native Version
0.73.0
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/react-native-community/reproducer-react-native
Screenshots and Videos
No response