fix-error-path-on-server-headers-wrong.patch

Signed-off-by: Andy Green <andy@warmcat.com>
diff --git a/lib/client-handshake.c b/lib/client-handshake.c
index c3b7cec..bb46a7a 100644
--- a/lib/client-handshake.c
+++ b/lib/client-handshake.c
@@ -142,6 +142,7 @@
 	wsi->user_space = NULL;
 	wsi->state = WSI_STATE_CLIENT_UNCONNECTED;
 	wsi->pings_vs_pongs = 0;
+	wsi->protocol = NULL;
 
 	for (n = 0; n < WSI_TOKEN_COUNT; n++) {
 		wsi->utf8_token[n].token = NULL;
@@ -399,7 +400,8 @@
 			(!wsi->utf8_token[WSI_TOKEN_PROTOCOL].token_len &&
 							    protocol != NULL)) {
 		fprintf(stderr, "libwebsocket_client_handshake "
-						   "missing required header\n");
+						"missing required header(s)\n");
+		fprintf(stderr, "%s", pkt);
 		goto bail2;
 	}