You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/02/10 16:27:10 UTC

[GitHub] [activemq-artemis] jbertram opened a new pull request #2980: ARTEMIS-2619 allow disabling STOMP 'server' header

jbertram opened a new pull request #2980: ARTEMIS-2619 allow disabling STOMP 'server' header
URL: https://github.com/apache/activemq-artemis/pull/2980
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] gaohoward commented on a change in pull request #2980: ARTEMIS-2619 allow disabling STOMP 'server' header

Posted by GitBox <gi...@apache.org>.
gaohoward 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_r378606630
 
 

 ##########
 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:
   Is the disableServerHeader != null check not necessary?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] jbertram commented on a change in pull request #2980: ARTEMIS-2619 allow disabling STOMP 'server' header

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [activemq-artemis] asfgit closed pull request #2980: ARTEMIS-2619 allow disabling STOMP 'server' header

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #2980: ARTEMIS-2619 allow disabling STOMP 'server' header
URL: https://github.com/apache/activemq-artemis/pull/2980
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services