Open frioux opened 8 years ago
Yes, It's oversight, since the S3 hasn't been completely developed in Paws (other services don't require the Content-Length header)
I am experiencing the same problem. I tried to add "has ContentLength" to CreateMultipartUpload.pm (see below) but it didn't seem to help. The call times out, probably because AWS is waiting for contents of the body.
Here is the line I added: has ContentLength => (is => 'ro', isa => 'Int', traits => ['ParamInHeader'], header_name => 'Content-Length' );
Have you been able to get CreateMultipartUpload working?
Even forcing a Content-Lenght header for the CreateMultipartUpload call, I can't get it to work.
Seems to be because S3 multipart upload is more involved than what is implemented right now as per http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
If you want to give it a shot/need help, I'm willing to guide you to get the work done.
@frioux did you get anything to work?
Jose Luis
Thank you so much. I'll review the document that you posted and will start, next week, to try a few things. I know I will have questions, so I'm grateful for your willingness to help. Chat with you soon.
@orbweaver I had the same error when calling CopyObject. I've managed to get the call working for CopyObject. I suspect the changes might fix the CreateMultiPartUpload call too. If you're interested the changes are in PR#115 https://github.com/pplu/aws-sdk-perl/pull/115
Rereading the above, as well as the various documents I have some thoughts / questions: 1) Did the call send content-length at all?
The error message implies "content-length was sent, but wrong", neither the service-1.json nor the CreateMultipartUpload.pm lists content-length (and there's no stream param, so one shouldn't be added by RestXmlCaller..
2) There are a bunch of other Headers that the docs say are required, but service-1.json doesn't, eg content-type, content-encoding (see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html ) maybe this is what caused the error? - this feels like an issue in the call definition
t/s3/multipartupload.t (in tests/stabilisation) now run/RECORD fashion against live AWS, and it works fine.
Ok so I'm working on #90 and was just testing the code, and sadly I think that the implementation of CMU is broken. I try to create a multipart upload with this fairly simple call:
And I get the following exception:
On page 4 of the S3 manual that error explanation is:
You did not provide the number of bytes specified by the Content-Length HTTP header
I suspect that this is some simple oversight?