Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 5cd27e2d2 -> c272e40bc
  refs/heads/master af8c3283a -> 59939fddd


CAMEL-9664: Fixed mediatype matching to use equals method and ignore parameters.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/59939fdd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/59939fdd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/59939fdd

Branch: refs/heads/master
Commit: 59939fddd703f0880268ee1dc33fded2dc54cd9e
Parents: af8c328
Author: Claus Ibsen <davscl...@apache.org>
Authored: Fri Mar 4 15:10:23 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Fri Mar 4 15:10:23 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/component/restlet/DefaultRestletBinding.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/59939fdd/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
----------------------------------------------------------------------
diff --git 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 57037e4..b95ef7a 100644
--- 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -119,7 +119,7 @@ public class DefaultRestletBinding implements 
RestletBinding, HeaderFilterStrate
         }
 
         // only deal with the form if the content type is 
"application/x-www-form-urlencoded"
-        if (request.getEntity().getMediaType() != null && 
request.getEntity().getMediaType().equals(MediaType.APPLICATION_WWW_FORM)) {
+        if (request.getEntity().getMediaType() != null && 
request.getEntity().getMediaType().equals(MediaType.APPLICATION_WWW_FORM, 
true)) {
             Form form = new Form(request.getEntity());
             for (String paramName : form.getValuesMap().keySet()) {
                 String[] values = form.getValuesArray(paramName);
@@ -161,7 +161,7 @@ public class DefaultRestletBinding implements 
RestletBinding, HeaderFilterStrate
 
         Form form = null;
         // Use forms only for PUT, POST and x-www-form-urlencoded
-        if ((Method.PUT == method || Method.POST == method) && mediaType == 
MediaType.APPLICATION_WWW_FORM) {
+        if ((Method.PUT == method || Method.POST == method) && 
MediaType.APPLICATION_WWW_FORM.equals(mediaType, true)) {
             form = new Form();
             // must use string based for forms
             String body = exchange.getIn().getBody(String.class);

Reply via email to