[
https://issues.apache.org/jira/browse/CAMEL-20068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781961#comment-17781961
]
John Yin commented on CAMEL-20068:
----------------------------------
I attached a project rest-cxf.7z (modeled after the Camel rest-cxf example) to
help to illustrate the issue. The project has one CXFRS endpoint to receive
HTTP POST in one route. The route returns HTTP 201 with a location header.
The project has another route that sends HTTP POST requests repeatedly to the
endpoint and checks for the location header in the response. If the location
header is missing, it will throw an exception. I was not able to use this to
reproduce the issue (after sending the message a few hundreds of times), as the
issue is intermittent and happens once every few days in a heavy traffic
production environment. I was hoping that someone had seen something similar
to this before.
> camel-cxf - HTTP response (201) location header was dropped intermittently
> ---------------------------------------------------------------------------
>
> Key: CAMEL-20068
> URL: https://issues.apache.org/jira/browse/CAMEL-20068
> Project: Camel
> Issue Type: Bug
> Components: came-cxf
> Affects Versions: 3.20.6
> Reporter: John Yin
> Priority: Minor
> Attachments: rest-cxf.7z
>
>
> We have experienced this issue intermittently. The location header from a
> CXF response is dropped before the message is passed to a Camel processor.
> We can see the header in the log written by CXF, but by the time our Camel
> processor tries to retrieve it, it is not there anymore. This only happens
> intermittently. For most messages, the location header is not dropped.
> Here is a sample (first is the response logged by CXF, then the log written
> by the Camel processor):
> 2023-10-31 09:08:04.309 [default-workqueue-3] LoggingInInterceptor - Inbound
> Message
> ----------------------------
> ID: 45410
> Response-Code: 201
> Encoding: ISO-8859-1
> Content-Type:
> Headers: {connection=[keep-alive], Content-Length=[0],
> content-security-policy=[frame-ancestors 'self'], date=[Tue, 31 Oct 2023
> 13:08:04 GMT], expires=[Thu, 01 Jan 1970 00:00:00 GMT],
> {*}location{*}=[https://xxxxxxxxx.yyyyyy.com/api/arsys/v1/entry/HPD:IncidentInterface_Create/000000014986719],
> set-cookie=[route=1698757683.652.47992.895817; Path=/; HttpOnly,
> _cacheId=10924818,
> onbmc_pool=!Y0P+L7SOcB8UZmgyj6MhDh3vM3mAVYyEh7V+2//DSUv/YDSD/RBP7XekWn3xkkSBaZ8EZbs3xRZhzw==;
> path=/; Httponly], status=[200], x-ar-tr-core-id=[Ekke3dbjQSakiDkQGwsGDg],
> x-ar-tr-counter=[1], x-content-type-options=[nosniff],
> x-frame-options=[SAMEORIGIN], x-xss-protection=[1; mode=block]}
> 2023-10-31 09:08:04.310 [default-workqueue-3] ProcessAndStoreCustRespProc -
> ----INFO---- *location header:*
>
> But the processor immediately after the return of the HTTP call in the route
> could not find the location header in the Camel message headers.
>
> We are using Camel 3.20.6 with CXF 3.6.2.
>
> Thanks in advance for looking into this.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)