camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-9833: Add mapHttpMessage option to allow to turn off mapping by default
Date Sun, 10 Apr 2016 06:18:14 GMT
CAMEL-9833: Add mapHttpMessage option to allow to turn off mapping by default


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

Branch: refs/heads/master
Commit: 770b3870e5952d226c5d9a2b6c04f685213dfd75
Parents: 8a9a28f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Apr 10 08:03:35 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Apr 10 08:03:35 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/http/common/DefaultHttpBinding.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/770b3870/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java
index 6ded1ef..cb5f9e1 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java
@@ -100,12 +100,13 @@ public class DefaultHttpBinding implements HttpBinding {
     public void readRequest(HttpServletRequest request, HttpMessage message) {
         LOG.trace("readRequest {}", request);
 
-        if (mapHttpMessageHeaders) {
-            readHeaders(request, message);
-        }
+        // must read body before headers
         if (mapHttpMessageBody) {
             readBody(request, message);
         }
+        if (mapHttpMessageHeaders) {
+            readHeaders(request, message);
+        }
 
         // populate the headers from the request
         Map<String, Object> headers = message.getHeaders();


Mime
View raw message