You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/03/04 15:10:52 UTC

[1/2] camel git commit: CAMEL-9664: Fixed mediatype matching to use equals method and ignore parameters.

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 <da...@apache.org>
Authored: Fri Mar 4 15:10:23 2016 +0100
Committer: Claus Ibsen <da...@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);


[2/2] camel git commit: CAMEL-9664: Fixed mediatype matching to use equals method and ignore parameters.

Posted by da...@apache.org.
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/c272e40b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c272e40b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c272e40b

Branch: refs/heads/camel-2.16.x
Commit: c272e40bccc6b424983140b8dad39adb0df9b53f
Parents: 5cd27e2
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Mar 4 15:10:23 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Mar 4 15:10:43 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/c272e40b/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 a106104..80ddd4c 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);