[
https://issues.apache.org/jira/browse/CAMEL-24517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18108735#comment-18108735
]
Andrea Cosentino commented on CAMEL-24517:
------------------------------------------
Merged to main. Main-only (LOW). Resolving; fixVersion 4.23.0.
_Claude Code on behalf of oscerd_
> camel-ibm-cos: headBucket does not set the BucketExists producer header
> -----------------------------------------------------------------------
>
> Key: CAMEL-24517
> URL: https://issues.apache.org/jira/browse/CAMEL-24517
> Project: Camel
> Issue Type: Bug
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0
>
>
> The headBucket operation of IBMCOSProducer computes whether the bucket exists
> and sets it as the message body, but never sets the CamelIBMCOSBucketExists
> header (IBMCOSConstants.BUCKET_EXISTS), even though that header is declared
> as a producer @Metadata header. A route that reads the
> CamelIBMCOSBucketExists header after a headBucket call therefore gets null.
> {code:java}
> boolean exists = cosClient.doesBucketExistV2(bucketName);
> Message message = getMessageForResponse(exchange);
> message.setBody(exists);
> // BUCKET_EXISTS header never set
> {code}
> Fix: set the BUCKET_EXISTS header from the computed value.
> Affected: components/camel-ibm/camel-ibm-cos
> (org.apache.camel.component.ibm.cos.IBMCOSProducer.headBucket).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)