[ https://issues.apache.org/jira/browse/AMQ-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15034516#comment-15034516 ]
Christopher L. Shannon commented on AMQ-5939: --------------------------------------------- One issue with this patch is it breaks backwards compatibility. Because you got rid of getContentType(request), users who were specifying type with a request parameter would now break. See http://activemq.apache.org/rest.html There is an example on that page: {{wget --user admin --password admin http://localhost:8161/api/message/TEST?type=queue\&clientId=A\&json=true}} that would possibly not work since the json=true would no longer be checked. Another issue is that request.getContentType() is supposed to be used to specify the content of the request, not to specify what the response type is. The accept header is what should be used instead to specify what the response type is. That being said, your point about the content type being set in the wrong spot is correct and should be called before response.getWriter(). > ActiveMQ REST GET request is always encoded in ISO-8859-1 > --------------------------------------------------------- > > Key: AMQ-5939 > URL: https://issues.apache.org/jira/browse/AMQ-5939 > Project: ActiveMQ > Issue Type: Bug > Components: webconsole > Affects Versions: 5.12.0 > Reporter: Kirill Dubovikov > Assignee: Christopher L. Shannon > Priority: Minor > > ActiveMQ REST protocol does not support encodings other than ISO-8859-1. > 1) response.setContentType is called after response.getWriter - this > contradicts servlet specification, so setContentType does not work at all > 2) Content-Type header for the GET response is hardcoded inside > MessageServlet class > I've changed the class so that Content-Type header is being read from > request. This way users now can specify message body encoding through > Content-Type header. -- This message was sent by Atlassian JIRA (v6.3.4#6332)