You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Avinash Dongre (Jira)" <ji...@apache.org> on 2019/11/05 07:29:00 UTC
[jira] [Updated] (CAMEL-14139) Camel Undertow does not provide an
option to use the producer as the "Host" header when bridging two http
endpoints
[ https://issues.apache.org/jira/browse/CAMEL-14139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Avinash Dongre updated CAMEL-14139:
-----------------------------------
Description:
Camel undertow always propagates the same host header from source to target. There is no option to disable this.
{code:xml}
<route>
<from uri="undertow:http://localhost:8189"/>
<log message="Source ${in.headers.Host}" />
<to uri="undertow:http://localhost:8289"/>
</route>
<route>
<from uri="undertow:http://localhost:8289"/>
<log message="Target ${in.headers.Host}" />
</route>
{code}
Result:
{code:xml}
2019-11-05 12:43:54.738 INFO 30967 --- [ XNIO-2 task-1] route1 : Source localhost:8189
2019-11-05 12:43:54.789 INFO 30967 --- [ XNIO-3 task-1] route2 : Target localhost:8189
{code}
Expected:
{code:xml}
2019-11-05 12:43:54.738 INFO 30967 --- [ XNIO-2 task-1] route1 : Source localhost:8189
2019-11-05 12:43:54.789 INFO 30967 --- [ XNIO-3 task-1] route2 : Target localhost:8289
{code}
An option to disable the preservation of the original host is present in camel-http
was:
Camel undertow always propagates the same host header from source to target. There is no option to disable this.
{code:xml}
<route>
<from uri="undertow:http://localhost:8189"/>
<log message="Source ${in.headers.Host}" />
<to uri="undertow:http://localhost:8289"/>
</route>
<route>
<from uri="undertow:http://localhost:8289"/>
<log message="Target ${in.headers.Host}" />
</route>
{code}
Result:
{code:xml}
2019-11-05 12:43:54.738 INFO 30967 --- [ XNIO-2 task-1] route1 : Source localhost:8189
2019-11-05 12:43:54.789 INFO 30967 --- [ XNIO-3 task-1] route2 : Target localhost:8189
{code}
Expected:
{code:xml}
2019-11-05 12:43:54.738 INFO 30967 --- [ XNIO-2 task-1] route1 : Source localhost:8189
2019-11-05 12:43:54.789 INFO 30967 --- [ XNIO-3 task-1] route2 : Target localhost:8289
{code}
> Camel Undertow does not provide an option to use the producer as the "Host" header when bridging two http endpoints
> -------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-14139
> URL: https://issues.apache.org/jira/browse/CAMEL-14139
> Project: Camel
> Issue Type: Bug
> Components: camel-undertow
> Affects Versions: 3.0.0.RC3
> Reporter: Avinash Dongre
> Priority: Major
>
> Camel undertow always propagates the same host header from source to target. There is no option to disable this.
> {code:xml}
> <route>
> <from uri="undertow:http://localhost:8189"/>
> <log message="Source ${in.headers.Host}" />
> <to uri="undertow:http://localhost:8289"/>
> </route>
> <route>
> <from uri="undertow:http://localhost:8289"/>
> <log message="Target ${in.headers.Host}" />
> </route>
> {code}
>
> Result:
> {code:xml}
> 2019-11-05 12:43:54.738 INFO 30967 --- [ XNIO-2 task-1] route1 : Source localhost:8189
> 2019-11-05 12:43:54.789 INFO 30967 --- [ XNIO-3 task-1] route2 : Target localhost:8189
> {code}
> Expected:
> {code:xml}
> 2019-11-05 12:43:54.738 INFO 30967 --- [ XNIO-2 task-1] route1 : Source localhost:8189
> 2019-11-05 12:43:54.789 INFO 30967 --- [ XNIO-3 task-1] route2 : Target localhost:8289
> {code}
> An option to disable the preservation of the original host is present in camel-http
--
This message was sent by Atlassian Jira
(v8.3.4#803005)