fake-s3
fake-s3 copied to clipboard
Uploaded chunks using authorization header are not unwrapped before storing
When performing a chunked upload using the Authorization header, chunks are wrapped with a chunk length and signature as described here: http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
When storing these chunks, the wrapper needs to be removed before writing chunks. Right now, fake-s3 does not do this, resulting in the wrappers being written to files, corrupting them.
I have a hacky temporary fix made here: https://github.com/cesmoak/fake-s3. I don't claim to know enough about s3 or fake-s3 to say that this is robust, however it seems to work for me.
We also have that problem.
Have this problem too. Example http://take.ms/R1oEp
There is an issue https://github.com/jubos/fake-s3/issues/126 that attempted resolution but doesn't work for me.
A work around, depending on your application and test case, is to configure your client to not use chunked uploads:
AmazonS3Client client = new AmazonS3Client(credentials); client.setEndpoint("http://localhost:1234"); client.setS3ClientOptions(S3ClientOptions.builder().setPathStyleAccess(true).disableChunkedEncoding().build());
It would be good to see a fix merged in, but until then hopefully this will save people time in finding a solution.
I've also encountered this issue.
we do have the pb with fog/aws
also
I'm also encountering this.
aws_signature_version: 2
had to be set in the fog credentials of carrierwave