-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Options::additional_headers
and subprotocols
#27
Conversation
ewebsock/Cargo.toml
Outdated
log = "0.4" | ||
|
||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
|
Cargo.lock
Outdated
@@ -4,9 +4,9 @@ version = 3 | |||
|
|||
[[package]] | |||
name = "ab_glyph" | |||
version = "0.2.23" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Origin
header.In fact this header is mandatory, as explained in the RFC :
However, if we don't set the
Origin
header 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