handle unsupported protocol correctly
handle unsupported protocol correctly

Hi Andy,

First off, thanks for libwebsockets :-)

I've encountered a crash when a client connects to a libwebsockets server
but speicifies an unsupported protocol (Sec-WebSocket-Protocol).
handshake.c should probably be checking that wsi->protocol->name is not
null before doing a strcmp with it...
Attached is a patch for your consideration.

Cheers!
Nick

Signed-off-by: Nick Dowell <75ef9faee755c70589550b513ad881e5a603182c@nickdowell.com>

tvanderbruggen/libwebsockets,davidgaleano/libwebsockets,tvanderbruggen/libwebsockets,tvanderbruggen/libwebsockets,tvanderbruggen/libwebsockets,davidgaleano/libwebsockets,davidgaleano/libwebsockets,tvanderbruggen/libwebsockets,davidgaleano/libwebsockets