I'm currently trying to develop an application to upload files to an Amazon S3 bucket using cURL and C ++. After carefully reading the manual for S3 developers, I began to implement my application using cURL and formed a header as described in the developer manual, and after many tests and errors to determine the best way to create an S3 signature, I now encountered error 501 The resulting header suggests that the method I use is not implemented. I am not sure where I am going wrong, but here is the HTTP header that I am sending to Amazon:
PUT /test1.txt HTTP/1.1 Accept: */* Transfer-Encoding: chunked Content-Type: text/plain Content-Length: 29 Host: [BucketName].s3.amazonaws.com Date: [Date] Authorization: AWS [Access Key ID]:[Signature] Expect: 100-continue
My bucket name, passkey identifier, and signature are shortened for security reasons.
I'm not sure what I'm doing wrong, but I think the error is due to the Accept and Transfer-Encoding fields (not quite right). So can someone tell me what I'm doing wrong or why I get 501.
c ++ windows curl amazon-s3 libcurl
Zaid amir
source share