<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:147719152;
        mso-list-type:hybrid;
        mso-list-template-ids:1513025258 -1486600700 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:20.25pt;
        text-indent:-.25in;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Tony,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks for your reply.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Since RabbitMQ does not report any error back to the client and does not record anything in its logs either, it’s hard to find out what really happens. IMHO,
 if RabbitMQ thinks something is wrong, it should clearly say so.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Back to my test, the protocol used is STOMP 1.0 (RabbitMQ correctly reports it in its CONNECTED frame). There is no escaping defined in STOMP 1.0 so RabbitMQ
 should IMHO not perform any (de)escaping.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">If escaping is indeed the source of the problem, could one please consider:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:20.25pt;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Logging errors coming from incorrect escaping<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:20.25pt;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Not performing STOMP 1.1 (de)escaping on STOMP 1.0 connections<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:2.25pt"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:2.25pt"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Lionel<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> tonygarnockjones@gmail.com [mailto:tonygarnockjones@gmail.com]
<b>On Behalf Of </b>Tony Garnock-Jones<br>
<b>Sent:</b> Monday, April 16, 2012 4:19 PM<br>
<b>To:</b> Lionel Cons<br>
<b>Cc:</b> rabbitmq-discuss@lists.rabbitmq.com<br>
<b>Subject:</b> Re: [rabbitmq-discuss] Cannot send message with STOMP<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">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>
&nbsp; Tony<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 16 April 2012 09:42, Lionel Cons &lt;<a href="mailto:lionel.cons@cern.ch">lionel.cons@cern.ch</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">It seems I cannot send _some_ messages using STOMP. After investigation,<br>
this seems to come from the presence of &quot;exotic&quot; 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><o:p></o:p></p>
</div>
<p class="MsoNormal"><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><o:p></o:p></p>
</div>
</body>
</html>