maggie created CXF-9187:
---------------------------
Summary: CXF 4.1.4 returns HTTP 200 instead of the status set in
the JAX‑RS Response object (e.g., 202) when used in a Camel exchange body
Key: CXF-9187
URL: https://issues.apache.org/jira/browse/CXF-9187
Project: CXF
Issue Type: Bug
Components: JAX-RS
Affects Versions: 4.1.4
Environment: * Apache CXF 4.1.3 (works as expected)
* Apache CXF 4.1.4 (regression observed)
* Camel integration with CXF JAX‑RS
* Java version: Java 21
* OS: windows 11 pro
Reporter: maggie
When a JAX‑RS {{Response}} object with status 202 is placed into
{{{}exchange.in.body{}}}, CXF 4.1.3 correctly propagates the HTTP 202 status to
the client. In CXF 4.1.4, the same code path results in HTTP 200 being returned
instead. This appears to be a regression in how CXF handles the {{Response}}
object inside Camel exchanges.
*Steps to Reproduce:*
# Create a Camel route that builds a JAX‑RS {{Response}} object:
groovy
{{Response resp = Response.status(202).entity("Accepted").build()
exchange.in.body = resp}}
# Send a request to the route.
# Observe the HTTP status code in the client response.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)