-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fixes subprotocol selection (aling with rfc6455) #823
Conversation
Just received a notification from github with a comment from @FZambia.... But can not see it here.... |
O okay! Everything is clear now? |
As for me I still think that the RFC is not very clear about exact precedence, but seems there are some implementations which prefer client order already. The change in this PR may break some code I suppose - so probably it should be optional/configurable. But I am not a maintainer of this lib - just following. |
Well, I agree with you that it is not so clearly specified, but yeah, some other server implementations, that I know prefer the client's subprotocol in order of precedence. And that makes sense. Because in other cases - the server will always use its first one, and if the client knows that the server supports a few, it has to send only one it is interested in most... a bit weird... The tests are passing :) that is good. So I hope it won't break anything (much). |
Any maintainers around here? |
I agree that subprotocol selection should use the client order. Given the possibility that the PR breaks something, the PR will need to wait for a new maintainer. |
@KSDaemon I would like to see a unit test verifying that the order of the client protocols is preferred, then I think this would be good to be merged. |
@coreydaley Sure! I'll have a look! |
@coreydaley I've added tests. Please have a look when you'll have time! |
@coreydaley gentle ping |
Heh... yesterday was 1 year since I opened not the issue but PR with the fix! And it is still not merged.... And there is no indication that it will be merged in the foreseeable future.... |
@coreydaley gentle ping |
Yahoo! @coreydaley let's merge then? I can not make it :) |
Thank you! |
This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/gorilla/websocket](https://github.com/gorilla/websocket) | require | patch | `v1.5.1` -> `v1.5.3` | --- ### Release Notes <details> <summary>gorilla/websocket (github.com/gorilla/websocket)</summary> ### [`v1.5.3`](https://github.com/gorilla/websocket/releases/tag/v1.5.3) [Compare Source](gorilla/websocket@v1.5.2...v1.5.3) #### Important change This reverts the websockets package back to gorilla/websocket@931041c #### What's Changed - Fixes subprotocol selection (aling with rfc6455) by [@​KSDaemon](https://github.com/KSDaemon) in gorilla/websocket#823 - Update README.md, replace master to main by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#862 - Use status code constant by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#864 - conn.go: default close handler should not return ErrCloseSent. by [@​pnx](https://github.com/pnx) in gorilla/websocket#865 - fix: replace ioutil.readfile with os.readfile by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#868 - fix: add comment for the readBufferSize and writeBufferSize by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#869 - Remove noisy printf in NextReader() and beginMessage() by [@​bcreane](https://github.com/bcreane) in gorilla/websocket#878 - docs(echoreadall): fix function echoReadAll comment by [@​XdpCs](https://github.com/XdpCs) in gorilla/websocket#881 - make tests parallel by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#872 - Upgrader.Upgrade: use http.ResposnseController by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#871 - Do not handle network error in `SetCloseHandler()` by [@​nak3](https://github.com/nak3) in gorilla/websocket#863 - perf: reduce timer in write_control by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#879 - fix: lint example code by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#890 - feat: format message type by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#889 - Remove hideTempErr to allow downstream users to check for errors like net.ErrClosed by [@​UnAfraid](https://github.com/UnAfraid) in gorilla/websocket#894 - Do not timeout when WriteControl deadline is zero in gorilla/websocket#898 - Excludes errchecks linter by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#904 - Return errors instead of printing to logs by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#897 - Revert " Update go version & add verification/testing tools ([#​840](gorilla/websocket#840))" by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#908 - Fixes broken random value generation by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#926 - Reverts back to v1.5.0 by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#929 #### New Contributors - [@​KSDaemon](https://github.com/KSDaemon) made their first contribution in gorilla/websocket#823 - [@​mstmdev](https://github.com/mstmdev) made their first contribution in gorilla/websocket#862 - [@​pnx](https://github.com/pnx) made their first contribution in gorilla/websocket#865 - [@​rfyiamcool](https://github.com/rfyiamcool) made their first contribution in gorilla/websocket#868 - [@​bcreane](https://github.com/bcreane) made their first contribution in gorilla/websocket#878 - [@​XdpCs](https://github.com/XdpCs) made their first contribution in gorilla/websocket#881 - [@​ninedraft](https://github.com/ninedraft) made their first contribution in gorilla/websocket#872 - [@​nak3](https://github.com/nak3) made their first contribution in gorilla/websocket#863 - [@​UnAfraid](https://github.com/UnAfraid) made their first contribution in gorilla/websocket#894 - [@​apoorvajagtap](https://github.com/apoorvajagtap) made their first contribution in gorilla/websocket#904 **Full Changelog**: gorilla/websocket@v1.5.1...v1.5.3 ### [`v1.5.2`](https://github.com/gorilla/websocket/releases/tag/v1.5.2) [Compare Source](gorilla/websocket@v1.5.1...v1.5.2) #### What's Changed - Fixes subprotocol selection (aling with rfc6455) by [@​KSDaemon](https://github.com/KSDaemon) in gorilla/websocket#823 - Update README.md, replace master to main by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#862 - Use status code constant by [@​mstmdev](https://github.com/mstmdev) in gorilla/websocket#864 - conn.go: default close handler should not return ErrCloseSent. by [@​pnx](https://github.com/pnx) in gorilla/websocket#865 - fix: replace ioutil.readfile with os.readfile by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#868 - fix: add comment for the readBufferSize and writeBufferSize by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#869 - Remove noisy printf in NextReader() and beginMessage() by [@​bcreane](https://github.com/bcreane) in gorilla/websocket#878 - docs(echoreadall): fix function echoReadAll comment by [@​XdpCs](https://github.com/XdpCs) in gorilla/websocket#881 - make tests parallel by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#872 - Upgrader.Upgrade: use http.ResposnseController by [@​ninedraft](https://github.com/ninedraft) in gorilla/websocket#871 - Do not handle network error in `SetCloseHandler()` by [@​nak3](https://github.com/nak3) in gorilla/websocket#863 - perf: reduce timer in write_control by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#879 - fix: lint example code by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#890 - feat: format message type by [@​rfyiamcool](https://github.com/rfyiamcool) in gorilla/websocket#889 - Remove hideTempErr to allow downstream users to check for errors like net.ErrClosed by [@​UnAfraid](https://github.com/UnAfraid) in gorilla/websocket#894 - Do not timeout when WriteControl deadline is zero in gorilla/websocket#898 - Excludes errchecks linter by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#904 - Return errors instead of printing to logs by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#897 - Revert " Update go version & add verification/testing tools ([#​840](gorilla/websocket#840))" by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#908 - Fixes broken random value generation by [@​apoorvajagtap](https://github.com/apoorvajagtap) in gorilla/websocket#926 #### New Contributors - [@​KSDaemon](https://github.com/KSDaemon) made their first contribution in gorilla/websocket#823 - [@​mstmdev](https://github.com/mstmdev) made their first contribution in gorilla/websocket#862 - [@​pnx](https://github.com/pnx) made their first contribution in gorilla/websocket#865 - [@​rfyiamcool](https://github.com/rfyiamcool) made their first contribution in gorilla/websocket#868 - [@​bcreane](https://github.com/bcreane) made their first contribution in gorilla/websocket#878 - [@​XdpCs](https://github.com/XdpCs) made their first contribution in gorilla/websocket#881 - [@​ninedraft](https://github.com/ninedraft) made their first contribution in gorilla/websocket#872 - [@​nak3](https://github.com/nak3) made their first contribution in gorilla/websocket#863 - [@​UnAfraid](https://github.com/UnAfraid) made their first contribution in gorilla/websocket#894 - [@​apoorvajagtap](https://github.com/apoorvajagtap) made their first contribution in gorilla/websocket#904 **Full Changelog**: gorilla/websocket@v1.5.1...v1.5.2 </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yODYuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQxOS4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> See merge request alpine/infra/build-server-status!14
Fixes #822
Summary of Changes