[
https://issues.apache.org/jira/browse/CAMEL-13249?focusedWorklogId=202737&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-202737
]
ASF GitHub Bot logged work on CAMEL-13249:
------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Feb/19 17:07
Start Date: 22/Feb/19 17:07
Worklog Time Spent: 10m
Work Description: zregvart commented on pull request #2790: CAMEL-13249:
invoke `applyFilterToCamelHeaders` instead of `applyFilterToExternalHeaders`
URL: https://github.com/apache/camel/pull/2790
This changes the invocation in
`HttpRestHeaderFilterStrategy::applyFilterToCamelHeaders` to delegate to
`super::applyFilterToCamelHeaders` instead of
`super::applyFilterToExternalHeaders`.
Also adds integration test demonstrating the issue and refactors
`HttpRestHeaderFilterStrategyTest` from `components/camel-http4` to
`/components/camel-http-common` as it doesn't depend on `http4` component and
tests a class in `camel-http-common`.
@davsclaus @oscerd can you take a look, this seems right to me, but the use
of `applyFilterToExternalHeaders` vs `applyFilterToCamelHeaders` seems
intentional so I could be missing something.
If this change gets approved I'll backport it to `2.23.x` and forward port
it to `master`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 202737)
Time Spent: 10m
Remaining Estimate: 0h
> Header filtering in HTTP producers from RestProducerFactory filters IN
> instead of OUT headers
> ---------------------------------------------------------------------------------------------
>
> Key: CAMEL-13249
> URL: https://issues.apache.org/jira/browse/CAMEL-13249
> Project: Camel
> Issue Type: Bug
> Components: camel-http-common
> Affects Versions: 2.18.0
> Reporter: Zoran Regvart
> Assignee: Zoran Regvart
> Priority: Major
> Fix For: 3.0.0, 2.23.2, 2.24.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{HttpRestHeaderFilterStrategy}} is used by HTTP producers and it delegates
> to {{applyFilterToExternalHeaders}} from superclass, which filters in the
> {{IN}} direction instead of in the {{OUT}} direction.
> This leads to an issue when HTTP consumer is followed by a HTTP producer
> created from the {{RestProducerFactory}} implementation in that the HTTP
> headers that are meant to be filtered out are passed on to the HTTP service
> being invoked.
> These headers include {{Host}} header which is used for virtual hosting and
> will most likely fail the request with 404 or 503 HTTP status.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)