node-stomp-client icon indicating copy to clipboard operation
node-stomp-client copied to clipboard

parse message-id error

Open amwicfai opened this issue 12 years ago • 5 comments

the message-id include ":", example: xxxxxxxxx04-37571-1369787148937-2:209:-1:1:3

so split it by ":" is error.

var kv = line.split(':', 2); //from parser.js

amwicfai avatar May 31 '13 06:05 amwicfai

Pretty sure headers need encoding see:

http://stomp.github.io/stomp-specification-1.1.html#Value_Encoding

easternbloc avatar May 31 '13 12:05 easternbloc

Are you using ActiveMQ?

If so what version?

easternbloc avatar May 31 '13 12:05 easternbloc

I can reproduce the problem on ActiveMQ 5.8, please verify.

amwicfai avatar May 31 '13 15:05 amwicfai

Strange, it appears to have been fixed in 5.6

https://issues.apache.org/jira/browse/AMQ-3501

easternbloc avatar May 31 '13 15:05 easternbloc

I haven't attempted to verify this, but it sounds like a bug. Note that stomp-client makes STOMP 1.0 connections, not 1.1 (the accept-version: header is missing, see http://stomp.github.io/stomp-specification-1.1.html#protocol_negotiation), and header values can contain any character other than NL in 1.0. The first : is the name/value seperator:

header              = header-name ":" header-value
header-name         = 1*<any CHAR except LF or ":">
header-value        = 1*<any CHAR except LF>

sam-github avatar Jun 06 '13 17:06 sam-github