get content-length from buffer instead of string (see http://stackoverflow.com/questions/17284408/knox-s3-upload-corrupted-or-truncated-file)
Merge pull request #1 from abiskop/master

get content-length from buffer instead of string