Andrea Cosentino created CAMEL-24084:
----------------------------------------

             Summary: camel-knative: apply header filter strategy to 
structured-mode CloudEvent extension headers
                 Key: CAMEL-24084
                 URL: https://issues.apache.org/jira/browse/CAMEL-24084
             Project: Camel
          Issue Type: Improvement
          Components: camel-knative
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino
             Fix For: 4.22.0


The Knative consumer filters inbound HTTP headers through 
{{KnativeHttpHeaderFilterStrategy}}, so Camel-internal headers (the {{Camel*}} 
namespace) are not mapped onto the message. When a CloudEvent is received in 
structured content mode ({{application/cloudevents+json}}), 
{{CloudEventProcessors.decodeStructuredContent}} maps the remaining event 
fields (extensions) directly onto the message headers without applying any 
{{HeaderFilterStrategy}}, which is inconsistent with the binary/HTTP-header 
path.

This change routes structured-mode extension fields through a 
{{HeaderFilterStrategy}} before setting them as headers, so {{Camel*}} headers 
(matched case-insensitively) are filtered consistently on both content modes. 
Ordinary CloudEvent extension attributes are unaffected.

Affected: camel-knative-component ({{CloudEventProcessors}} / 
{{AbstractCloudEventProcessor}}) on main (4.22.0), 4.18.x and 4.14.x. An 
upgrade-guide note is included.

_Filed by Claude Code on behalf of Andrea Cosentino (@oscerd)._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to