camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: Fixed url rewrite issue after a recent bug fix.
Date Sun, 10 Jan 2016 09:54:13 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 1febbd6a7 -> 92b137d4c
  refs/heads/master d222ef786 -> 27aa338f3


Fixed url rewrite issue after a recent bug fix.


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

Branch: refs/heads/master
Commit: 27aa338f35e52df631dc4eaa98aec4fef0efc787
Parents: d222ef7
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jan 10 10:53:19 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jan 10 10:53:19 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/http/common/HttpHelper.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/27aa338f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
index 4a3c952..2365eb6 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java
@@ -412,6 +412,10 @@ public final class HttpHelper {
             // we should use the relative path if possible
             String baseUrl;
             relativeUrl = endpoint.getHttpUri().toASCIIString();
+            // strip query parameters from relative url
+            if (relativeUrl.contains("?")) {
+                relativeUrl = ObjectHelper.before(relativeUrl, "?");
+            }
             if (url.startsWith(relativeUrl)) {
                 baseUrl = url.substring(0, relativeUrl.length());
                 relativeUrl = url.substring(relativeUrl.length());


Mime
View raw message