Claus Ibsen created CAMEL-27957:
-----------------------------------

             Summary: camel-odata: response headers of an earlier call stay on 
the exchange
                 Key: CAMEL-27957
                 URL: https://issues.apache.org/jira/browse/CAMEL-27957
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Found while improving the option descriptions of camel-odata for CAMEL-23832 
(pull request https://github.com/apache/camel/pull/31196).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. CamelODataNextLink, CamelODataCount and CamelODataETag of an earlier 
call stay on the exchange
{{ODataProducer.process}} only sets these headers when the response has the 
field, and never removes the old values. When the same exchange is sent again 
(a pagination loop), the values of the previous page remain: a loop that stops 
when CamelODataNextLink is missing never ends, and the old CamelODataETag is 
sent as If-Match on the next request. Reproduced with a WireMock test: page 1 
returned nextLink, count and ETag, page 2 none, and after page 2 the exchange 
still had the page-1 values.
Proposed change: remove CamelODataNextLink and CamelODataCount before copying 
the response headers, and remove the incoming CamelODataETag once it has been 
moved to If-Match.

h4. 2. Smaller issues
READ_ENTRY without CamelODataKey sends a GET to the entity set (the same as 
READ_SET); a key set for READ_SET or CREATE is ignored silently. A blank query 
header (for example CamelODataFilter="") does not fall back to the endpoint 
option; the query option is left out. With sslContextParameters on an http:// 
URI the HTTP endpoint is built as https while CamelHttpUri stays http:// (not 
tested). The pom description "Camel OData Component" feeds the SBOM.


_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to