title: S3 Object Creation with meta-data using CURL is failing
body: <p>I am trying to perform a HTTP PUT to create and update objects while specifying a custom meta-data header. I am having difficulty generating the correct signature while I have no issue generating signatures for other requested operations. Here is my basic bash / CURL example.  Let me emphasize, I must see and use Bash and Curl, not leverage s3curl, or other libraries or CLIs in my specific situation:</p>
  
  <pre><code>#!/bin/bash
  
  file="$1"
  
  key_id="raanan"
  key_secret="my-secret"
  url="my-s3-endpoint"
  bucket="testbucket"
  path="$file"
  content_type="application/octet-stream"
  date="$(LC_ALL=C date -u +"%a, %d %b %Y %X %z")"
  md5="$(openssl md5 -binary &lt; "$file" | base64)"
  daheader="x-amz-meta-user:qatester\n"
  sig="$(printf "PUT\n$md5\n$content_type\n$date\n$daheader$bucket/$path" |    
  openssl sha1 -binary -hmac "$key_secret" | base64)"
  curl -k -w "@curl-format.txt" -T $file http://my-s3-endpoint/$bucket$path -vv \
  -H "Date: $date" \
  -H "Authorization: AWS $key_id:$sig" \
  -H "Content-Type: $content_type" \
  -H "Content-MD5: $md5" \
  -H "x-amz-meta-user: qatester"
  
  &gt;&gt;&gt;&gt;HTTP/1.1 403 Forbidden
  &gt;&gt;&gt;&gt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;Error&gt;
  &lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;&lt;Message&gt;The request signature we    calculated 
  does not match the signature you provided. Check your secret access key and   signing method.&lt;/Message&gt;&lt;Resource&gt;&lt;/Resource&gt;&lt;RequestId&gt;&lt;/RequestId&gt;    &lt;/Error&gt;
  </code></pre>
  
  <p>Am I missing something here?</p>
  
  <p>Thanks</p>