[
https://issues.apache.org/jira/browse/SCB-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683166#comment-16683166
]
ASF GitHub Bot commented on SCB-1019:
-------------------------------------
liubao68 commented on a change in pull request #988: [SCB-1019]consumer support
application/xml MIME type
URL:
https://github.com/apache/servicecomb-java-chassis/pull/988#discussion_r232527797
##########
File path:
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java
##########
@@ -77,6 +78,9 @@ public Object getValue(HttpServletRequest request) throws
Exception {
// edge support convert from form-data or x-www-form-urlencoded to json
automatically
String contentType = request.getContentType();
contentType = contentType == null ? "" :
contentType.toLowerCase(Locale.US);
+ if (contentType.startsWith(MediaType.APPLICATION_XML)) {
+ return new
XmlMapper().readValue(IOUtils.toString(request.getInputStream()),
targetType.getRawClass());
Review comment:
XmlMapper should not create each time. See RestObjectMapperFactory
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> (https://issues.apache.org/jira/browse/SCB
> ------------------------------------------
>
> Key: SCB-1019
> URL: https://issues.apache.org/jira/browse/SCB-1019
> Project: Apache ServiceComb
> Issue Type: Task
> Reporter: laijianbin
> Priority: Major
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)