]> git.ipfire.org Git - thirdparty/tornado.git/commit
websocket: Improve subprotocol support
authorBen Darnell <ben@bendarnell.com>
Sat, 12 May 2018 18:43:58 +0000 (14:43 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 12 May 2018 18:43:58 +0000 (14:43 -0400)
commitfac04e0acfb4a79a819c4905380b95f545e3719b
treede8f6e04cc5c916b4e026213807fdb317ebbe7bf
parent8afac1f805de738ccd0f58618b84b0a5f90dd346
websocket: Improve subprotocol support

- Add client-side subprotocol option
- Add selected_subprotocol attribute to client and server objects
- Call select_subprotocol exactly once instead of only on non-empty
- Fix bug in previous select_subprotocol change when multiple
  subprotocols are offered
- Add tests

Updates #2281
docs/releases/v5.1.0.rst
docs/websocket.rst
tornado/test/websocket_test.py
tornado/websocket.py