write the Sec-WebSocket-Protocol header conditionally (if codec is set)

Signed-off-by: Luka Blaskovic <lblasc@znode.net>