Skip to content

Commit

Permalink
WebSocketClientProtocolHandler: make default allowMaskMismatch = true
Browse files Browse the repository at this point in the history
  • Loading branch information
mostroverkhov committed Feb 9, 2023
1 parent bebd5c5 commit e3dca48
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,28 @@ void tearDown() throws Exception {
}
}

@Test
void serverBuilderMinimalConfigIsValid() {
WebSocketServerProtocolHandler serverProtocolHandler =
WebSocketServerProtocolHandler.create()
.webSocketCallbacksHandler(
(ctx, webSocketFrameFactory) -> {
throw new AssertionError("never called");
})
.build();
}

@Test
void clientBuilderMinimalConfigIsValid() {
WebSocketClientProtocolHandler clientProtocolHandler =
WebSocketClientProtocolHandler.create()
.webSocketHandler(
(ctx, webSocketFrameFactory) -> {
throw new AssertionError("never called");
})
.build();
}

@Timeout(15)
@Test
void frameSizeLimit() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public static final class Builder {
private String subprotocol;
private HttpHeaders headers;
private boolean mask = true;
private boolean allowMaskMismatch;
private boolean allowMaskMismatch = true;
private int maxFramePayloadLength = 65_535;
private long handshakeTimeoutMillis = 15_000;
private WebSocketCallbacksHandler webSocketHandler;
Expand Down

0 comments on commit e3dca48

Please sign in to comment.