Skip to content

Commit

Permalink
WIP: Upgrades Jetty 9.4.43.v20210629 to 10.0.15
Browse files Browse the repository at this point in the history
Correct configuration of websocket compression. Compression is provided out of the box by Jetty's `permessage-deflate` extension.

Previously Openfire was registering the `permessage-deflate` extension, I assume this was attempting to enable websocket compression.

Presently, websocket compression is enabled by default in Jetty. So the correct way to control websocket compression is to disable the `permessage-deflate` extension when compression is not wanted:
jetty/jetty.project#1341
  • Loading branch information
viv committed Sep 4, 2023
1 parent 266967d commit 58bef71
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ protected void service(HttpServletRequest request, HttpServletResponse response)
@Override
public void configure(JettyWebSocketServletFactory factory)
{
if (WebSocketClientConnectionHandler.isCompressionEnabled()) {
factory.getAvailableExtensionNames().add("permessage-deflate");
if (!WebSocketClientConnectionHandler.isCompressionEnabled()) {
factory.getAvailableExtensionNames().remove("permessage-deflate");
}
final int messageSize = JiveGlobals.getIntProperty("xmpp.parser.buffer.size", 1048576);
factory.setInputBufferSize(messageSize * 5);
Expand Down

0 comments on commit 58bef71

Please sign in to comment.