Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63BEE187C4 for ; Sun, 10 Jan 2016 09:54:13 +0000 (UTC) Received: (qmail 74020 invoked by uid 500); 10 Jan 2016 09:54:13 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 73965 invoked by uid 500); 10 Jan 2016 09:54:13 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 73951 invoked by uid 99); 10 Jan 2016 09:54:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jan 2016 09:54:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1D430DFFAE; Sun, 10 Jan 2016 09:54:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Sun, 10 Jan 2016 09:54:13 -0000 Message-Id: <7a9fcec567a74236ab3836512b241ca0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Sun Jan 10 10:53:19 2016 +0100 Committer: Claus Ibsen 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());