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

Headers not sent on WebSocket upgrade with 401 (UNAUTHORIZED) response #269

Closed
rstoyanchev opened this issue Jan 31, 2018 · 3 comments
Closed
Labels
type/bug A general bug
Milestone

Comments

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Jan 31, 2018

Expected behavior

After an authorization failure on a WebSocket upgrade request, the response status is set to 401 along with some authentication headers. The response completes.

Actual behavior

The response never completes unless response.sendHeaders() is also called, which seems to be the case for WebSocket upgrade requests only, and not for HTTP requests where a call to sendHeaders() isn't necessary.

Steps to reproduce

During a WebSocket upgrade request, set the status to 401 and add some headers, but don't call sendHeaders().

Reactor Netty version

0.7.3

JVM version (e.g. java -version)

Java 8

OS version (e.g. uname -a)

Linux

This was originally reported in https://jira.spring.io/browse/SPR-16421.

@rstoyanchev rstoyanchev changed the title Headers not sent on WebSocket upgrade with 401 (UNAUTHORIZED) Headers not sent on WebSocket upgrade with 401 (UNAUTHORIZED) response Jan 31, 2018
@violetagg violetagg added this to the 0.7.4.RELEASE milestone Jan 31, 2018
@violetagg violetagg added the type/bug A general bug label Jan 31, 2018
@violetagg
Copy link
Member

You should be able to test with the latest 0.7.4.BUILD-SNAPSHOT

@tsachev
Copy link

tsachev commented Feb 1, 2018

Thanks @violetagg it works now expected (without any workarounds) in my app.

@violetagg
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants