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

Add Upgrader.NegotiateSubprotocol gorilla/websocket#606 #14

Conversation

tebruno99
Copy link

Original PR: gorilla#606 by @AllenX2018

Fixes gorilla#480 gorilla#404 #12 #13

Summary of Changes

1.Add the method NegotiateSubprotocol func (r * http.Request) (string, error) in the upgrade, the user can customize the negotiation sub-protocol.
2. NegotiateSubprotocol has higher priority than Subprotocols.
3.The responseHeader does not support negotiated sub-protocol (Sec-WebSocket-Protocol),If necessary, please use Upgrader.NegotiateSubprotocol and Upgrader.Subprotocols,use the method to view the Upgrader struct.

@tebruno99 tebruno99 self-assigned this Dec 13, 2022
@tebruno99 tebruno99 merged commit 0f373df into ElasticPerch:enhancement/12-add-upgradernegotiatesubprotocols Dec 13, 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