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 2020/01/31 06:15:37 UTC

[camel-spring-boot] branch master updated: CAMEL-14460: camel-core - Optimize and allow to turn off case insensitive headers

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

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


The following commit(s) were added to refs/heads/master by this push:
     new eaa1b43  CAMEL-14460: camel-core - Optimize and allow to turn off case insensitive headers
eaa1b43 is described below

commit eaa1b43b49f1f911c4f784ffab88b722be94d7cd
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jan 31 07:15:20 2020 +0100

    CAMEL-14460: camel-core - Optimize and allow to turn off case insensitive headers
---
 camel-spring-boot/src/main/docs/spring-boot.adoc             |  3 ++-
 .../camel/spring/boot/CamelConfigurationProperties.java      | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/camel-spring-boot/src/main/docs/spring-boot.adoc b/camel-spring-boot/src/main/docs/spring-boot.adoc
index 2270144..6e77476 100644
--- a/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -89,7 +89,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 144 options, which are listed below.
+The component supports 145 options, which are listed below.
 
 
 
@@ -158,6 +158,7 @@ The component supports 144 options, which are listed below.
 | *camel.springboot.backlog-tracing* | Sets whether backlog tracing is enabled or not. Default is false. | false | Boolean
 | *camel.springboot.bean-introspection-extended-statistics* | Sets whether bean introspection uses extended statistics. The default is false. | false | Boolean
 | *camel.springboot.bean-introspection-logging-level* | Sets the logging level used by bean introspection, logging activity of its usage. The default is TRACE. |  | LoggingLevel
+| *camel.springboot.case-insensitive-headers* | Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation wi [...]
 | *camel.springboot.consumer-template-cache-size* | Consumer template endpoints cache size. | 1000 | Integer
 | *camel.springboot.duration-max-idle-seconds* | To specify for how long time in seconds Camel can be idle before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
 | *camel.springboot.duration-max-messages* | To specify how many messages to process by Camel before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
diff --git a/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
index f5b0ce3..7242257 100644
--- a/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
+++ b/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
@@ -340,6 +340,18 @@ public class CamelConfigurationProperties extends DefaultConfigurationProperties
     private boolean allowUseOriginalMessage;
 
     /**
+     * Whether to use case sensitive or insensitive headers.
+     *
+     * Important: When using case sensitive (this is set to false).
+     * Then the map is case sensitive which means headers such as content-type and Content-Type are
+     * two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers.
+     * However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care.
+     *
+     * Default is true.
+     */
+    private boolean caseInsensitiveHeaders = true;
+
+    /**
      * Sets whether the inflight repository should allow browsing each inflight exchange.
      *
      * This is by default disabled as there is a very slight performance overhead when enabled.