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/01/10 10:54:13 UTC
[1/2] camel git commit: Fixed url rewrite issue after a recent bug
fix.
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 <da...@apache.org>
Authored: Sun Jan 10 10:53:19 2016 +0100
Committer: Claus Ibsen <da...@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());
[2/2] camel git commit: Fixed url rewrite issue after a recent bug
fix.
Posted by da...@apache.org.
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/92b137d4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/92b137d4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/92b137d4
Branch: refs/heads/camel-2.16.x
Commit: 92b137d4c87da8b0f21d2e4e53623361d6aa0f68
Parents: 1febbd6
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 10 10:53:19 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 10 10:53:35 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/92b137d4/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());