activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r389845 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp: Send.java Subscription.java
Date Wed, 29 Mar 2006 17:52:03 GMT
Author: chirino
Date: Wed Mar 29 09:52:01 2006
New Revision: 389845

URL: http://svn.apache.org/viewcvs?rev=389845&view=rev
Log:
Better content-length handling.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java?rev=389845&r1=389844&r2=389845&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
Wed Mar 29 09:52:01 2006
@@ -112,6 +112,9 @@
             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);
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java?rev=389845&r1=389844&r2=389845&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java
Wed Mar 29 09:52:01 2006
@@ -81,6 +81,7 @@
             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);
         }
         



Mime
View raw message