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 2018/07/09 08:20:20 UTC

[camel] 02/02: CAMEL-12594: Fixed rest producer header name substitution issue. Thanks to Leonid Remennik for reporting.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a232dfafade3c9ec087ea5e677a8edc7f004156d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Jul 9 10:14:13 2018 +0200

    CAMEL-12594: Fixed rest producer header name substitution issue. Thanks to Leonid Remennik for reporting.
---
 .../src/main/java/org/apache/camel/component/rest/RestProducer.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestProducer.java b/camel-core/src/main/java/org/apache/camel/component/rest/RestProducer.java
index ea7fc12..83b36cc 100644
--- a/camel-core/src/main/java/org/apache/camel/component/rest/RestProducer.java
+++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestProducer.java
@@ -406,7 +406,7 @@ public class RestProducer extends DefaultAsyncProducer {
                         }
                         String value = inMessage.getHeader(key, String.class);
                         if (value != null) {
-                            params.put(key, value);
+                            params.put(entry.getKey(), value);
                         } else if (!optional) {
                             // value is null and parameter is not optional
                             params.put(entry.getKey(), entry.getValue());