Hi

I've had a search through the issues but I think this is still a bug.
When an object is consumed from an AWS S3 endpoint it doesn't retrieve the
userMetadata correctly

The code here:
https://github.com/apache/camel/blob/master/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java

sets the S3Constants.S3_HEADERS header as so:

message.setHeader(S3Constants.S3_HEADERS, objectMetadata.getRawMetadata());

This is using a method that is internal - see:
http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/ObjectMetadata.html

In addition the rawMetadata seems to hold many (if not all) of the other
headers thats are retrieved explicitly e.g. Content-Type, Content-Length
etc; but doesn't hold userMetadata

It should do this:

message.setHeader(S3Constants.S3_HEADERS, objectMetadata.getUserMetadata());

If you want to get the userMetadata from the object. 

I have doen some tests with the SDK writing and reading objects with
userMetadata

Thought I would post here before I raise an issue.

Regards
Stan



--
View this message in context: 
http://camel.465427.n5.nabble.com/AWS-S3-Consumer-Bug-tp5790485.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to