AMQ-4668: REST API only accepts non-form content if content type of text/xml

This commit is contained in:
Claus Ibsen 2013-11-01 18:04:35 +01:00
parent 190da29691
commit 70e2b998d2
1 changed files with 2 additions and 1 deletions

View File

@ -341,7 +341,8 @@ public abstract class MessageServletSupport extends HttpServlet {
protected String getPostedMessageBody(HttpServletRequest request) throws IOException {
String answer = request.getParameter(bodyParameter);
String contentType = request.getContentType();
if (answer == null && contentType != null && contentType.toLowerCase().startsWith("text/xml")) {
if (answer == null && contentType != null) {
LOG.debug("Content-Type={}", contentType);
// lets read the message body instead
BufferedReader reader = request.getReader();
StringBuffer buffer = new StringBuffer();