jbertram commented on a change in pull request #2980: ARTEMIS-2619 allow
disabling STOMP 'server' header
URL: https://github.com/apache/activemq-artemis/pull/2980#discussion_r378608938
##########
File path:
artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java
##########
@@ -85,7 +85,10 @@ public StompFrame onConnect(StompFrame frame) {
response.addHeader(Stomp.Headers.Connected.SESSION,
connection.getID().toString());
// server
- response.addHeader(Stomp.Headers.Connected.SERVER,
connection.getActiveMQServerName());
+ Object disableServerHeader =
connection.getAcceptorUsed().getConfiguration().get(TransportConstants.DISABLE_STOMP_SERVER_HEADER);
+ if (disableServerHeader == null || (disableServerHeader != null &&
!Boolean.parseBoolean(disableServerHeader.toString()))) {
Review comment:
Yes, I think you're right. If `disableServerHeader == null` then it will
short-circuit the other check and enter the block.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services