[
https://issues.apache.org/jira/browse/CAMEL-7246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14029375#comment-14029375
]
Raúl Kripalani commented on CAMEL-7246:
---------------------------------------
Another possibility (and this is the one I like the most) entails qualifying
ALL protocol headers transmitted through a boundary in some manner, for example
by storing the headers as a Map<String, Object> under header keys:
[endpointId].protocolHeaders.[input/output].
That way, if you're route is like this:
{code}
from("jetty:http://0.0.0.0:9090").id("jettyConsumer")
.to("cxfrs:bean:blablabla").id("cxfrsProducer");
{code}
Camel could store the protocol headers under:
* jettyConsumer.protocolHeaders.input => incoming HTTP headers from the outside
world.
* cxfrsProducer.protocolHeaders.input => place where to look to pick up headers
to be sent by the producer.
* cxfrsProducer.protocolHeaders.output => outgoing HTTP headers from producer.
* jettyConsumer.protocolHeaders.output => place where to look to pick up
headers to send to the original client.
Like this, there's no confusion anymore. Because a big flaw of the current
model is that incoming and outgoing headers – no matter which endpoint they
appeared from – are all being dumped in the same place with the same names. And
there's no traceability. Therefore, you can end up with a Content-Type from one
endpoint and Content-Length from another. And that, in my opinion, is what
needs to be fixed first: how headers are scoped.
It's a major change, though, not an easy fix.
Sorry for the rant again :D
Regards,
Raúl.
> [cxfrs] SimpleConsumer returns wrong Content-Type
> -------------------------------------------------
>
> Key: CAMEL-7246
> URL: https://issues.apache.org/jira/browse/CAMEL-7246
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.12.2
> Reporter: Alexey Markevich
> Attachments: camel-cxfrs-content-type.zip
>
>
> Looks like Content-Type is taken from request
--
This message was sent by Atlassian JIRA
(v6.2#6252)