It's probably the backslashes in the headers that you're sending. Because STOMP's syntax forbids linefeeds and colons not only in header names but also in header values (!!), RabbitMQ's STOMP codec uses backslash escaping (for the values only, I note), which isn't part of the specification.<br>
<br>Even though you're not sending colons in header values, you're being affected by the escaping. STOMP's syntax plus RabbitMQ's ad-hoc escaping then are two wrongs that definitely don't make a right :-(<br>
<br>STOMP's syntax, terrible though it is, is set in stone, so I guess the only hope left is some tweak to or removal of the backslash escaping mechanism in the RabbitMQ codec. I'm at a loss as to what the right thing to do here is. (Besides fix STOMP, obviously.)<br>
<br>One option would be to do no escaping, but if a header is about to be encoded using some illegal character (i.e. LF or colon), encode it using some totally nonstandard but also totally unambiguous format such as a colon in the first column of the line followed by two netstrings? It'd completely crash any parser that wasn't looking out for it, because it's illegal syntax, but then so is including an unescaped colon or LF in the first place, so we're already into uncharted territory.<br>
<br>:4:what,17:a terrible design,<br><br>A middle ground would be to forbid sending colons in header *names* but silently pass them on in header *values* (they're harmless, and it's a silly restriction), and if a LF were seen, to encode it as LF-colon. A naive parser then would see a pseudo-header with an empty name; parsers expecting this convention would understand it to be a header value continuation from the previous line.<br>
<br>Any way you slice it, though: yuck.<br><br>Regards,<br> Tony<br><br><br><div class="gmail_quote">On 16 April 2012 09:42, Lionel Cons <span dir="ltr"><<a href="mailto:lionel.cons@cern.ch">lionel.cons@cern.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It seems I cannot send _some_ messages using STOMP. After investigation,<br>
this seems to come from the presence of "exotic" characters in the header.<br>
<br>
I managed to reproduce the problem with netcat and the attached file.<br>
<br>
When I try to use the file to send the message, I get nothing back:<br>
<br>
$ (cat frame; sleep 1) | nc broker 6123<br>
<br>
If I remove the two header lines starting with rnd-, it does work as<br>
expected:<br>
<br>
$ (cat frame.clean; sleep 1) | nc broker 6123<br>
CONNECTED<br>
session:session-wUaTaF5qzu7nKZ4TmuaWFM<br>
heart-beat:0,0<br>
server:RabbitMQ/2.8.0<br>
version:1.0<br>
<br>
RECEIPT<br>
receipt-id:abc<br>
<br>
So it seems that RabbitMQ does not like these header lines... Any idea on<br>
what is happening?<br>
<br>
Cheers,<br>
<br>
Lionel<br>
<br>
<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Tony Garnock-Jones<br><a href="mailto:tonygarnockjones@gmail.com" target="_blank">tonygarnockjones@gmail.com</a><br><a href="http://homepages.kcbbs.gen.nz/tonyg/" target="_blank">http://homepages.kcbbs.gen.nz/tonyg/</a><br>