Stomp v1.1 support, headers, eg: message-id, are not properly escaped
---------------------------------------------------------------------
Key: AMQ-3501
URL: https://issues.apache.org/jira/browse/AMQ-3501
Project: ActiveMQ
Issue Type: Bug
Components: stomp
Affects Versions: 5.6.0
Reporter: Gary Tully
Fix For: 5.6.0
headers need to be escaped, see:
http://stomp.github.com/stomp-specification-1.1.html#Value_Encoding
but the message-id header on a message receipt is not, the perl stomp v 1.1
client does a check:{code}# STOMP 1.1 behavior:
# - header names and values can contain any OCTET except \n or :
# - space is significant in the header
# - "only the first header entry should be used"
# - handle backslash escaping
foreach $line (split(/\n/, $temp)) {
unless ($line =~ /^([^:]+):([^:]*)$/o) {
Net::STOMP::Client::Error::report("%s: invalid header: %s",
$me, $line);
return();
{code} and errors out on the un-escaped ':'in the raw message-id. This was not
a requirement in STOMP v1.0.
{code}*** Net::STOMP::Client::Frame::decode(): invalid header:
message-id:ID:gtmbp.local-52988-1316088964662-2:7:-1:1:1
at /opt/local/lib/perl5/site_perl/5.8.9/Net/STOMP/Client/Error.pm line 39
Net::STOMP::Client::Error::report('%s: invalid header: %s',
'Net::STOMP::Client::Frame::decode()',
'message-id:ID:gtmbp.local-52988-1316088964662-2:7:-1:1:1') called at
/opt/local/lib/perl5/site_perl/5.8.9/Net/STOMP/Client/Frame.pm line 286
Net::STOMP::Client::Frame::decode('SCALAR(0x987818)', 'version', 1.1,
'state', 'HASH(0x988184)') called at
/opt/local/lib/perl5/site_perl/5.8.9/Net/STOMP/Client.pm line 472
Net::STOMP::Client::receive_frame('Net::STOMP::Client=HASH(0x988040)',
1) called at /opt/local/lib/perl5/site_perl/5.8.9/Net/STOMP/Client.pm line
502{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira