Open Na2l opened 1 year ago
adding header basic auth header to the websocket object causes server to close the connection imidietly with this warning messageL
Session 30 closed because of CloseReason: code [1002], reason [A fragmented control frame was received but control frames may not be fragmented]
String identity = userID + ":" + passwd; String encoded= Base64.encodeToString(identity.getBytes(), Base64.DEFAULT); webSocket.addHeader("Authorization", "Basic " + encoded);
The workaround is to instead of adding the basic auth header to add the user:pass to the request uri, i.e.: uri = new URI("wss://" + user+":" + pass+ :"443/websocket" );
adding header basic auth header to the websocket object causes server to close the connection imidietly with this warning messageL
Session 30 closed because of CloseReason: code [1002], reason [A fragmented control frame was received but control frames may not be fragmented]
String identity = userID + ":" + passwd; String encoded= Base64.encodeToString(identity.getBytes(), Base64.DEFAULT); webSocket.addHeader("Authorization", "Basic " + encoded);
The workaround is to instead of adding the basic auth header to add the user:pass to the request uri, i.e.: uri = new URI("wss://" + user+":" + pass+:"443/websocket" );