'charset=utf-8' missing in http api get response header.

11 views
Skip to first unread message

Prasanth Sukumaran Nair

unread,
Nov 21, 2018, 3:08:58 PM11/21/18
to rabbitmq-users

Hello, 


I am using HTTP API from DB2 SQL using the supplied UDF. This needs charset to be supplied in the Response Header 'Content-Type'. E.g 'Content Type:application/json:charset=utf-8'. Please  could anyone tell me if there a Setting in RabbitmQ where I can get this charset as well? Thanks in advance.

What we normally get in Response Header is as follows (re-producable with a simple curl)

< content-length: 448
content-length: 448
< content-type: application/json
content-type: application/json
< date: Wed, 21 Nov 2018 10:40:44 GMT
date: Wed, 21 Nov 2018 10:40:44 GMT
< server: Cowboy
server: Cowboy
< vary: accept, accept-encoding, origin
vary: accept, accept-encoding, origin


My RMQ version is 3.7.5


Thanks,
Prasanth.

Loïc Hoguin

unread,
Nov 21, 2018, 4:22:36 PM11/21/18
to rabbitm...@googlegroups.com, Prasanth Sukumaran Nair
Hello,

The application/json seems to be hardcoded. It could be changed by
editing this line on your corresponding version:
https://github.com/rabbitmq/rabbitmq-management/blob/v3.7.x/src/rabbit_mgmt_util.erl#L246
But maybe that's more trouble than is worth. Alternatively a proxy could
do the rewrite on the fly.

That said, there are no charset parameter to the application/json media
type (https://tools.ietf.org/html/rfc8259#section-11), and JSON is by
definition using utf-8, so it's not "missing" either.

Hope this is helpful.

Cheers,
> --
> You received this message because you are subscribed to the Google
> Groups "rabbitmq-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to rabbitmq-user...@googlegroups.com
> <mailto:rabbitmq-user...@googlegroups.com>.
> To post to this group, send email to rabbitm...@googlegroups.com
> <mailto:rabbitm...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
Loïc Hoguin
https://ninenines.eu
Reply all
Reply to author
Forward
0 new messages