mirror of https://github.com/apache/activemq.git
Better content-length handling.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@389845 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c80b084cdc
commit
38d8b832ef
|
@ -112,6 +112,9 @@ class Send implements StompCommand {
|
|||
msg.setPersistent(asBool(persistent));
|
||||
}
|
||||
|
||||
// No need to carry the content length in the JMS headers.
|
||||
headers.remove(Stomp.Headers.CONTENT_LENGTH);
|
||||
|
||||
// now the general headers
|
||||
msg.setProperties(headers);
|
||||
|
||||
|
|
|
@ -81,6 +81,7 @@ public class Subscription {
|
|||
ActiveMQBytesMessage msg = (ActiveMQBytesMessage)m;
|
||||
byte[] data = new byte[(int)msg.getBodyLength()];
|
||||
msg.readBytes(data);
|
||||
builder.addHeader(Stomp.Headers.CONTENT_LENGTH, data.length);
|
||||
builder.setBody(data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue