mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-22 16:30:51 +01:00
Set correct maximum on websocket policy
This commit is contained in:
parent
feb1f2a527
commit
2c5c3f7db8
@ -72,8 +72,8 @@ public class NitroWebsocketClient implements NitroSession {
|
||||
});
|
||||
|
||||
activeSession = (JsrSession) session;
|
||||
activeSession.setMaxBinaryMessageBufferSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
activeSession.setMaxTextMessageBufferSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
activeSession.getPolicy().setMaxBinaryMessageSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
activeSession.getPolicy().setMaxTextMessageSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
|
||||
// Set proper headers to spoof being a real client.
|
||||
final Map<String, List<String>> headers = new HashMap<>(activeSession.getUpgradeRequest().getHeaders());
|
||||
|
@ -188,8 +188,8 @@ public class NitroWebsocketServer implements WebSocketListener, NitroSession {
|
||||
private WebSocketClient createWebSocketClient() {
|
||||
final WebSocketClient client = new WebSocketClient(createHttpClient());
|
||||
|
||||
client.setMaxBinaryMessageBufferSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
client.setMaxTextMessageBufferSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
client.getPolicy().setMaxBinaryMessageSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
client.getPolicy().setMaxTextMessageSize(NitroConstants.WEBSOCKET_BUFFER_SIZE);
|
||||
|
||||
return client;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user