My server was sending the header as "Sec-Websocket-Accept" and not "Sec-WebSocket-Accept" (notice the capital "s"). The solution is change this line in "WebSocketClient":
if (header.getName().equals("Sec-WebSocket-Accept")) {
to this
if (header.getName().toLowerCase().equals("sec-websocket-accept")) {
According to the HTTP header standards: "Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive."
My server was sending the header as "Sec-Websocket-Accept" and not "Sec-WebSocket-Accept" (notice the capital "s"). The solution is change this line in "WebSocketClient":
to this
According to the HTTP header standards: "Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive."