Skip to content
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

Update WebSocketHeadersSample #839

Merged
merged 1 commit into from
May 15, 2020
Merged

Conversation

rstoyanchev
Copy link
Contributor

@rstoyanchev rstoyanchev commented May 15, 2020

The sample no longer needs to apply the ReassemblyDuplexConnection wrapper following d8da87a. It was also incorrectly trying to send a WebSocket status based on an HTTP response code which caused an exception in Reactor Netty.

Arguably unauthorized upgrades should be rejected earlier, during the initial handshake, so the sample is switched to use an HTTP request handler instead of a WebSocket handler in order to disallow the upgrade if not authorized.

First, the sample no longer needs to apply the
ReassemblyDuplexConnection wrapper following d8da87.

Another problem is that it was incorrectly trying to send a WebSocket
status from an HTTP response code which was rejected by Reactor Netty.

Arguably unauthorized upgrades should be rejected during the initial
handshake, so now uses an HTTP request handler instead of a WebSocket
handler disallows the upgrade if not authorized.

Signed-off-by: Rossen Stoyanchev <rstoyanchev@pivotal.io>
@OlegDokuka OlegDokuka merged commit 1181272 into rsocket:master May 15, 2020
@OlegDokuka OlegDokuka added this to the 1.0.1 milestone May 15, 2020
@rstoyanchev rstoyanchev deleted the ws-sample branch May 17, 2020 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants