Skip to content

Add accept_unmasked_frames setting in WebSocketUpgrade - #1529

Merged
davidpdrsn merged 3 commits into
tokio-rs:mainfrom
danielvschoor:main
Nov 15, 2022
Merged

Add accept_unmasked_frames setting in WebSocketUpgrade#1529
davidpdrsn merged 3 commits into
tokio-rs:mainfrom
danielvschoor:main

Conversation

@danielvschoor

Copy link
Copy Markdown
Contributor

Motivation

I am working with some legacy websocket clients that do not follow RFC 6455 and is thus sending unmasked frames via websockets. There isn't a way to change these clients, but tungstenite does expose an accept_unmasked_frames config option which can be set by axum.

Solution

I've added accept_unmasked_frames to WebSocketUpgrade to set the underlying config setting and allow unmasked frames

Please let me know if anything needs to change

@davidpdrsn davidpdrsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Wanna add a note to the changelog as well?

@danielvschoor

Copy link
Copy Markdown
Contributor Author

Thanks! Wanna add a note to the changelog as well?

Done

Comment thread axum/CHANGELOG.md Outdated

@davidpdrsn davidpdrsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@davidpdrsn
davidpdrsn enabled auto-merge (squash) November 15, 2022 08:55
@davidpdrsn
davidpdrsn merged commit c461f1d into tokio-rs:main Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants