[ 
https://issues.apache.org/jira/browse/CAMEL-23588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18088544#comment-18088544
 ] 

Andrea Cosentino commented on CAMEL-23588:
------------------------------------------

Backporting CAMEL-23588 to the maintenance branches (main already has the fix 
and the 4_21 upgrade-guide entry):

* camel-4.18.x: apache/camel#23992 (verbatim of the main change)
* camel-4.14.x: apache/camel#23993 (adapted - on 4.14.x 
UndertowHeaderFilterStrategy is the deprecated 
DefaultHeaderFilterStrategy-based implementation, so the websocket.* prefix is 
added to its existing initialize())
* main doc-sync: apache/camel#23994 (adds the 4_18 / 4_14 upgrade-guide entries 
to main)

fixVersions updated to 4.14.8 / 4.18.3 / 4.21.0. Keeping this open until the 
backports merge.

_Claude Code on behalf of Andrea Cosentino_

> camel-undertow - align websocket header names with Camel naming convention 
> (CAMEL-23532 follow-on)
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-23588
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23588
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-undertow
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.14.8, 4.18.3, 4.21.0
>
>
> {{UndertowConstants}} exposes producer-read websocket headers with 
> non-prefixed values:
> * {{CONNECTION_KEY = "websocket.connectionKey"}} - target WebSocket peer
> * {{CONNECTION_KEY_LIST = "websocket.connectionKey.list"}} - target list of 
> peers
> * {{SEND_TO_ALL = "websocket.sendToAll"}} - broadcast flag
> Same pattern fixed in {{camel-atmosphere-websocket}} and 
> {{camel-vertx-websocket}} under CAMEL-23532. Either rename to 
> {{CamelUndertow<Name>}} or extend {{UndertowHeaderFilterStrategy}} to filter 
> the {{websocket.*}} prefix on inbound, mirroring the CAMEL-23532 approach. 
> The HeaderFilterStrategy route is preferable here since 
> {{websocket.connectionKey}} is publicly documented as the API contract.
> h3. Fix shape
> Rename the *string value* of each producer-read header constant to 
> {{Camel<Component><Name>}}; keep the Java field name unchanged so routes that 
> reference the constants symbolically continue to compile and run. Update 
> tests that use the literal string values; regenerate component catalog JSON 
> and docs; add an upgrade-guide entry in {{camel-4x-upgrade-guide-4_21.adoc}} 
> (and matching 4_18 / 4_14 for backports where the component existed in those 
> branches).
> h3. References
> * Tracker: CAMEL-23577
> * Precedent (rename pattern): CAMEL-23526 (camel-cxf)
> * Alternative pattern (HeaderFilterStrategy approach): CAMEL-23532 
> (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy)



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

Reply via email to