activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1398833 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompCodec.java
Date Tue, 16 Oct 2012 14:59:37 GMT
Author: tabish
Date: Tue Oct 16 14:59:37 2012
New Revision: 1398833

URL: http://svn.apache.org/viewvc?rev=1398833&view=rev
Log:
Fix for: https://issues.apache.org/jira/browse/AMQ-4104

Let the protocol converter handle setting the version after it forwards the CONNECTED frame.


Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompCodec.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompCodec.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompCodec.java?rev=1398833&r1=1398832&r2=1398833&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompCodec.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompCodec.java
Tue Oct 16 14:59:37 2012
@@ -16,10 +16,6 @@
  */
 package org.apache.activemq.transport.stomp;
 
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.DataByteArrayInputStream;
-
 import java.io.ByteArrayInputStream;
 import java.util.Arrays;
 import java.util.Collections;
@@ -27,6 +23,10 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 
+import org.apache.activemq.transport.tcp.TcpTransport;
+import org.apache.activemq.util.ByteArrayOutputStream;
+import org.apache.activemq.util.DataByteArrayInputStream;
+
 public class StompCodec {
 
     final static byte[] crlfcrlf = new byte[]{'\r','\n','\r','\n'};
@@ -64,9 +64,6 @@ public class StompCodec {
                    action = wf.parseAction(data);
                    headers = wf.parseHeaders(data);
                    try {
-                       if (action.equals(Stomp.Commands.CONNECT) || action.equals(Stomp.Commands.STOMP))
{
-                           wf.setStompVersion(detectVersion(headers));
-                       }
                        String contentLengthHeader = headers.get(Stomp.Headers.CONTENT_LENGTH);
                        if ((action.equals(Stomp.Commands.SEND) || action.equals(Stomp.Responses.MESSAGE))
&& contentLengthHeader != null) {
                            contentLength = wf.parseContentLength(contentLengthHeader);



Mime
View raw message