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

Fix for subprotocol: some browsers reject empty string #143

Closed
wants to merge 1 commit into from
Closed

Fix for subprotocol: some browsers reject empty string #143

wants to merge 1 commit into from

Conversation

cxa
Copy link
Contributor

@cxa cxa commented Mar 11, 2017

@haraldsegliens
Copy link

haraldsegliens commented Sep 4, 2022

@phoboslab can you, please, merge this. The problem is still present. See: https://stackoverflow.com/questions/73591020/jsmpeg-in-chrome-cannot-read-websocket-stream-served-by-spring-webflux.

But the provided change doesn't work in Chrome, because of a error: DOMException: Failed to construct 'WebSocket': The subprotocol '' is invalid.

The change that works in Chrome is as follows:

if(this.options.protocols) {
   this.socket = new WebSocket(this.url, this.options.protocols);
} else {
    this.socket = new WebSocket(this.url);
}

@phoboslab phoboslab closed this in 3afb0e5 Sep 4, 2022
@phoboslab
Copy link
Owner

Thanks for the info and your patience! :)

@haraldsegliens
Copy link

Thank you :)

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.

3 participants