You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrew Rosenberg (Jira)" <ji...@apache.org> on 2022/01/10 16:01:00 UTC
[jira] [Comment Edited] (CAMEL-17366) AWS2-S3 endpoint building doesn't work as expected wrt headers
[ https://issues.apache.org/jira/browse/CAMEL-17366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17472120#comment-17472120 ]
Andrew Rosenberg edited comment on CAMEL-17366 at 1/10/22, 4:00 PM:
--------------------------------------------------------------------
Hi Claus.
The expression doesn't get parsed and AWS S3 Client receives {{key="$simple\{headers.computeFileUri}"}}
was (Author: iapetus999):
Hi Claus.
The expression doesn't get parsed and AWS S3 Client receives `key="$simple\{headers.computeFileUri}"`
> AWS2-S3 endpoint building doesn't work as expected wrt headers
> --------------------------------------------------------------
>
> Key: CAMEL-17366
> URL: https://issues.apache.org/jira/browse/CAMEL-17366
> Project: Camel
> Issue Type: Bug
> Components: camel-endpointdsl
> Affects Versions: 3.12.0, 3.14.0
> Reporter: Andrew Rosenberg
> Priority: Minor
>
> I have an expression like this but what's in `fileName` doesn't resolve to the header value. I think it's being escaped when it shouldn't be.
> {{.simple(}}
> {{ aws2S3("${headers." + FILE_BUCKET_HEADER_KEY + "}")}}
> {{ .amazonS3Client("#commonS3Client")}}
> {{ .bridgeErrorHandler(true)}}
> {{ .useDefaultCredentialsProvider(true)}}
> {{ .advanced().autocloseBody(true).basic()}}
> {{ .includeBody(false)}}
> {{ .deleteAfterRead(false)}}
> {{ .fileName("${headers." + FILE_URI_HEADER_KEY + "}")}}
> {{ .getUri())}}
> My workaround that works is this but I don't love it
> {{.simple(}}
> {{ aws2S3("${headers." + FILE_BUCKET_HEADER_KEY + "}"}}
> {{ *+ "?fileName=${headers." + FILE_URI_HEADER_KEY + "}")*}}
> {{ .amazonS3Client("#commonS3Client")}}
> {{ .bridgeErrorHandler(true)}}
> {{ .useDefaultCredentialsProvider(true)}}
> {{ .advanced().autocloseBody(true).basic()}}
> {{ .includeBody(false)}}
> {{ .deleteAfterRead(false)}}
> {{ .getUri())}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)