title: Uploading to Amazon S3 using cURL/libcurl
body: <p>I am currently trying to develop an application to upload files to an Amazon S3 bucket using cURL and c++. After carefully reading the S3 developers guide I have started implementing my application using cURL and forming the Header as described by the Developers guide and after lots of trials and errors to determine the best way to create the S3 signature, I am now facing a 501 error. The received header suggests that the method I'm using is not implemented. I am not sure where I'm wrong but here is the HTTP header that I'm sending to amazon:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I have truncated the Bucket Name, Access Key ID and Signature for security reasons.</p>
  
  <p>I am not sure what I'm doing wrong but I think that the error is generating because of the Accept and Transfer-Encoding Fields (Not Really Sure). So can anyone tell me what I'm doing wrong or why I'm getting a 501.</p>