Return-Path: X-Original-To: apmail-activemq-issues-archive@minotaur.apache.org Delivered-To: apmail-activemq-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D36D817874 for ; Mon, 21 Sep 2015 08:32:04 +0000 (UTC) Received: (qmail 15262 invoked by uid 500); 21 Sep 2015 08:32:04 -0000 Delivered-To: apmail-activemq-issues-archive@activemq.apache.org Received: (qmail 15228 invoked by uid 500); 21 Sep 2015 08:32:04 -0000 Mailing-List: contact issues-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 issues@activemq.apache.org Received: (qmail 15219 invoked by uid 99); 21 Sep 2015 08:32:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2015 08:32:04 +0000 Date: Mon, 21 Sep 2015 08:32:04 +0000 (UTC) From: "Abhi (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AMQ-5975) invalid header errror MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Abhi created AMQ-5975: ------------------------- Summary: invalid header errror Key: AMQ-5975 URL: https://issues.apache.org/jira/browse/AMQ-5975 Project: ActiveMQ Issue Type: Bug Components: stomp Affects Versions: 5.11.1 Reporter: Abhi # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: encoding CONNECT frame # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H passcode: # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H accept-version:1.0,1.1,1.2 # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H host:bismuth31.nyc # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H login: # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: sent 73 bytes # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: received 123 bytes # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: decoding CONNECTED frame # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H server:ActiveMQ/5.11.1 # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H heart-beat:0,0 # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H session:ID:bismuth31.nyc-47753-1442302511794-1:3 # 2015/09/15-03:35:13 stomp_producer.pl[29263.0]: H version:1.2 [20150915 03:35:13.507 Net::Stomp::connect():332 WARN] Error while connecting to the message broker: invalid header: session:ID:bismuth31.nyc-47753-1442302511794-1:3 This is happening because session header contains ':' in its value which fails the check when using STOMPv1.1 protocol. ActiveMQ generates a default client id if one is not provided at the start and uses that to set session-id. But the session header cannot contain ':'. (https://github.com/apache/activemq/blob/138e52b08c2f49b730817932a6e63f2a135854f1/activemq-client/src/main/java/org/apache/activemq/util/IdGenerator.java and https://github.com/apache/activemq/blob/87fd0a9e054017254c3857b245ca6fb9047ccc4f/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java#L797) We can use generateSanitizedId() here to avoid this issue(https://github.com/apache/activemq/blob/87fd0a9e054017254c3857b245ca6fb9047ccc4f/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java#L797) -- This message was sent by Atlassian JIRA (v6.3.4#6332)