netty/netty — pull request #2940 by Matthias247 (2014-09-26 20:21:36+00:00)
Title: Add verification for websocket subprotocol on the client side.

This adds some verification functionality for the websocket subprotocol on the client side.
If the client requests to speak a subprotocol but the server replies none or a not-requested subprotocol it should be treated as an error. If we request no subprotocol but the server replies one it's also an error.

I also added a getter for the WebSocketClientHandshaker in the WebSocketClientProtocolHandler, because you need to access it in order to extract the actual subprotocol but when you use one of the WebSocketClientProtocolHandler constructors which internally create a handshaker it is hidden from the user.