tabish121 commented on code in PR #5297:
URL: https://github.com/apache/activemq-artemis/pull/5297#discussion_r1799606506


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java:
##########
@@ -152,15 +154,27 @@ public void channelRead(ChannelHandlerContext ctx, Object 
msg) throws Exception
             FullHttpRequest request = (FullHttpRequest) msg;
             HttpHeaders headers = request.headers();
             String upgrade = headers.get("upgrade");
+
             if (upgrade != null && upgrade.equalsIgnoreCase("websocket")) {
                int stompMaxFramePayloadLength = 
ConfigurationHelper.getIntProperty(TransportConstants.STOMP_MAX_FRAME_PAYLOAD_LENGTH,
 -1, nettyAcceptor.getConfiguration());
                if (stompMaxFramePayloadLength != -1) {
                   
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption(TransportConstants.STOMP_MAX_FRAME_PAYLOAD_LENGTH,
 TransportConstants.WEB_SOCKET_MAX_FRAME_PAYLOAD_LENGTH);
                }
                stompMaxFramePayloadLength = stompMaxFramePayloadLength != -1 ? 
stompMaxFramePayloadLength : 
TransportConstants.DEFAULT_WEB_SOCKET_MAX_FRAME_PAYLOAD_LENGTH;
+
                int webSocketMaxFramePayloadLength = 
ConfigurationHelper.getIntProperty(TransportConstants.WEB_SOCKET_MAX_FRAME_PAYLOAD_LENGTH,
 -1, nettyAcceptor.getConfiguration());
-               String encoderConfigType = 
ConfigurationHelper.getStringProperty(TransportConstants.WEB_SOCKET_ENCODER_TYPE,
 TransportConstants.DEFAULT_WEB_SOCKET_ENCODER_TYPE, 
nettyAcceptor.getConfiguration());
-               ctx.pipeline().addLast("websocket-handler", new 
WebSocketServerHandler(websocketSubprotocolIds, webSocketMaxFramePayloadLength 
!= -1 ? webSocketMaxFramePayloadLength : stompMaxFramePayloadLength, 
WebSocketFrameEncoderType.valueOfType(encoderConfigType)));
+               webSocketMaxFramePayloadLength = webSocketMaxFramePayloadLength 
!= -1 ? webSocketMaxFramePayloadLength : stompMaxFramePayloadLength;
+
+               final boolean enableCompression = 
ConfigurationHelper.getBooleanProperty(
+                  TransportConstants.WEB_SOCKET_COMPRESSION_SUPPORTED, false, 
nettyAcceptor.getConfiguration());

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to