[rabbitmq-discuss] Patch for letting the STOMP consumers receive the content-type header
Tony Garnock-Jones
tonyg at lshift.net
Mon Aug 11 17:41:17 BST 2008
Hi Rui,
Thanks for your patch. It looks good. I'll apply it now.
Rui Lopes wrote:
> Currently the SOMP consumers do not receive the "content-type" header
> that is set by a STOMP or AMQP producer; the attached patch contains a
> partial fix for this; Its a partial because I'm not sure how to map the
> AMQP "content_type" and "content_encoding" to the STOMP "content-type"
> header.
Neither are we :-) but I've been treating content_type as if it were a
MIME type in other situations, so we may as well do the same here.
> As a note, the ruby stomp client is using "content-type" as a MIME
> content-type header where the type and charset are bundled together as
> in "content-type= text/plain; charset=utf-8".
This seems reasonable. I don't like the idea of doing any parsing of
this header, yet, though, until the formats are more precisely defined
in the various standards.
> We should also consider the use of ActiveMQ "type" header instead of
> using "content-type", or maybe translate between the two? take a look
> at http://activemq.apache.org/stomp.html (do a search for JMSType).
I think they're different - does JMSType always line up exactly with
MIME content-type? Certainly in AMQP, there's an equivalent of the
JMSType field which is otherwise undocumented, and is distinct from the
content-type header. (The JMS mappings in 0-8 and 0-9 are a bit of a mess.)
Regards,
Tony
More information about the rabbitmq-discuss
mailing list