Add Options::additional_headers and subprotocols#27
Conversation
| # native: | ||
| [target.'cfg(not(target_arch = "wasm32"))'.dependencies] | ||
| tungstenite = { version = ">=0.17, <=0.20" } | ||
| tungstenite = { version = ">=0.17, <=0.21" } |
There was a problem hiding this comment.
this needs to be set to the version number of the first tungstenite release with the with_header function
There was a problem hiding this comment.
Yes you're right !
I'm waiting for the new version. I'm tagging the PR as DRAFT to wait for it
ba720a7 to
f6d612e
Compare
|
When tungstenite Now waiting for the version bump |
|
Hi Note that when the 0.23 will be out, it could be more convenient to use it (see snapview/tungstenite-rs#427) |
|
There migth be a problem with tokio-tungstenite right now snapview/tokio-tungstenite#334 (that's breaking my local CI/CD on my repo https://github.com/Its-Just-Nans/ewebsock/actions/runs/9337202702) |
|
tungstenite and tokio-tungstenite are now at 0.23 ! I think this is mergeable now (local CI/CD pass: https://github.com/Its-Just-Nans/ewebsock/actions/runs/9338012481) |
|
Fixed the typo @emilk not sure if I can fix the label https://github.com/rerun-io/ewebsock/actions/runs/9338753874/job/25722267954 |
emilk
left a comment
There was a problem hiding this comment.
Thanks for the PR, but this PR now does three very different things:
A) replaces shell scripts with trunk
B) updates to tungstenite to 0.23
C) add default headers to the options
I would be thankful if you could break it into three PRs because
- it would be a lot easier to review
- it would be easier to revert one thing if we regret it
- it would be easier to git-bisect bugs in the future
|
okay, here my next steps:
|
|
@emilk I've done the PR for
I'm waiting for B) to be merge to edit this PR to make C)
|
|
|
||
| [[package]] | ||
| name = "ab_glyph" | ||
| version = "0.2.23" |
There was a problem hiding this comment.
Please revert all changes to Cargo.lock
Options::additional_headers and subprotocols
Hello,
In the native app, the Websocket protocol can lead to error because it doesn't act like the web interface.
When we are using the WebSocket API (in the browser), it add automatically some headers - like the
Originheader.In fact this header is mandatory, as explained in the RFC :
However, if we don't set the
Originheader in the native app, the app "could" not act the same as in the browserIn this PR, I had the Origin header to the client.
Note that
Thanks