Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D575A427F for ; Sun, 3 Jul 2011 06:43:14 +0000 (UTC) Received: (qmail 10155 invoked by uid 500); 3 Jul 2011 06:43:12 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 9913 invoked by uid 500); 3 Jul 2011 06:43:00 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 9897 invoked by uid 99); 3 Jul 2011 06:42:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2011 06:42:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2011 06:42:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1AE3B442ABA for ; Sun, 3 Jul 2011 06:42:22 +0000 (UTC) Date: Sun, 3 Jul 2011 06:42:21 +0000 (UTC) From: "Marcel Casado (JIRA)" To: dev@activemq.apache.org Message-ID: <1415777656.530.1309675342061.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (AMQ-3387) Backards imcompatibilitiy with version 5.3 and previous with the http protocol due chage on charset encoding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Backards imcompatibilitiy with version 5.3 and previous with the http protocol due chage on charset encoding ------------------------------------------------------------------------------------------------------------ Key: AMQ-3387 URL: https://issues.apache.org/jira/browse/AMQ-3387 Project: ActiveMQ Issue Type: Bug Components: Transport Affects Versions: 5.5.0, 5.4.2, 5.4.0 Reporter: Marcel Casado Changes in charset encoding from java modified UTF-8 to standard UTF-8 in class org.apache.activemq.transport.util.TextWireFormat makes clients and broker using different versions not compatible when using http transport protocol. Like a client 5.3 and broker 5.5 can not interchange messages in http transport protocol or the other way around. Backards compatibility support could be easily provided with : public Object unmarshal(DataInput in) throws IOException { String value; try { int length = in.readInt(); byte[] utf8 = new byte[length]; in.readFully(utf8); value = new String(utf8, "UTF-8"); return unmarshalText(value); } catch(Exception ex) { DataByteArrayInputStream dbais = (DataByteArrayInputStream) in; dbais.restart(0); value = dbais.readUTF(); return unmarshalText(value); } } and in HttpClientTransport calling unmarshal with a DataByteArrayInputStream: DataByteArrayInputStream stream = new DataByteArrayInputStream(httpMethod.getResponseBody()); Object command = (Object)getTextWireFormat().unmarshal(stream); With this changes was able to connect legacy clients 5.3 to new 5.5 brokers. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira