From fc1bebb0ad24629d94a0ef56ff56dd3f1567248b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 20 Jul 2015 12:01:46 +0300 Subject: [PATCH] Don't auto-send STOMP content-length header if one was explicitly set --- .../activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java index e0572c79062..3f41b6d1414 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java @@ -66,7 +66,7 @@ public ActiveMQBuffer toActiveMQBuffer() throws Exception head.append(h.getEncodedValue()); head.append(Stomp.NEWLINE); } - if (bytesBody != null && bytesBody.length > 0) + if (bytesBody != null && bytesBody.length > 0 && !hasHeader(Stomp.Headers.CONTENT_LENGTH)) { head.append(Stomp.Headers.CONTENT_LENGTH); head.append(Stomp.Headers.SEPARATOR);