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