-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
review WebSocket MessageWriter and MessageReader #4538
Comments
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
It would be good to implement Invalid UTF-8 should be tested for both Example test for @Test
public void testInvalidUtf8Sequence() throws IOException, InterruptedException
{
final CharsetEncoder utf8Encoder = UTF_8.newEncoder()
.onUnmappableCharacter(CodingErrorAction.REPORT)
.onMalformedInput(CodingErrorAction.REPORT);
final String invalidUtf8String = "\uD800";
assertThrows(MalformedInputException.class, () -> utf8Encoder.encode(CharBuffer.wrap(invalidUtf8String.toCharArray())));
FrameCapture capture = new FrameCapture();
capture.setOutputBufferSize(1024);
MessageWriter writer = new MessageWriter(capture, bufferPool);
writer.write(invalidUtf8String.toCharArray());
assertThrows(MalformedInputException.class, writer::flush);
} |
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Message reader now validates UTF8 Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Message reader now validates UTF8 Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
…Writer Issue #4538 - rework of websocket message reader and writers
Jetty version
10.0.x
Description
MessageWriter
andMessageOutputStream
look inefficient and are duplicated in both the jetty API and javax API implementations.The text was updated successfully, but these errors were encountered: