sean-hernon commented on code in PR #15145:
URL: https://github.com/apache/camel/pull/15145#discussion_r1760920184


##########
components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java:
##########
@@ -132,9 +169,30 @@ protected PlatformHttpConsumer 
createPlatformHttpConsumer(Processor processor) t
 
     @Override
     public HeaderFilterStrategy getHeaderFilterStrategy() {
+        if (!returnHttpRequestHeaders) {
+            return 
enhanceHeaderFilterStrategyToSkipHttpRequestHeaders(headerFilterStrategy);
+        }
         return headerFilterStrategy;
     }
 
+    private HeaderFilterStrategy 
enhanceHeaderFilterStrategyToSkipHttpRequestHeaders(
+            HeaderFilterStrategy headerFilterStrategy) {
+        return new HeaderFilterStrategy() {
+            @Override
+            public boolean applyFilterToCamelHeaders(String headerName, Object 
headerValue, Exchange exchange) {
+                if (COMMON_HTTP_REQUEST_HEADERS.contains(headerName)) {

Review Comment:
   According to the HTTP spec, headers are case-insensitive, but here they are 
being compared in a case-sensitive way. `COMMON_HTTP_REQUEST_HEADERS` should 
contain a set of normalised (e.g. lowercase) headers, then the header being 
compared should also be normalised (e.g. 
`COMMON_HTTP_REQUEST_HEADERS.contains(headerName.toLowerCase())`).
   
   Sorry, I realise I'm a bit late to the party, as this has been merged, but 
it's problematic for my use case. What is the right way about going about 
getting this changed? Thank you.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to