WIP. AutoBahn tests 6 working. Needed to check if final string is UTF-8 compliant.

This commit is contained in:
Veebs 2011-10-17 13:48:42 +11:00
parent 234952a516
commit beb56878e4

View File

@ -265,13 +265,13 @@ public class WebSocket08FrameDecoder extends ReplayingDecoder<WebSocket08FrameDe
// Check text for UTF8 correctness
if (frameOpcode == OPCODE_TEXT || fragmentedFramesText != null) {
// Check UTF-8 correctness for this payload
checkUTF8String(channel, framePayload.array());
}
// If final frame in a fragmented message, then set
// aggregated text so it can be returned
if (fragmentedFramesText != null) {
// This does a second check to make sure UTF-8
// correctness for entire text message
aggregatedText = fragmentedFramesText.toString();
fragmentedFramesText = null;
}
}