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 2021/12/21 19:57:00 UTC

[jira] [Created] (CAMEL-17366) AWS2-S3 endpoint building doesn't work as expected wrt headers

Andrew Rosenberg created CAMEL-17366:
----------------------------------------

             Summary: 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
            Reporter: Andrew Rosenberg


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)