From a07e804f571b0ef9741bef24aeb717eea6622f77 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sat, 28 Feb 2015 17:48:25 -0800 Subject: [PATCH] Include Content-Type in complete MPU V2 signature Previously this failed with SignatureDoesNotMatch since the headers included it but the signature did not. Fixes #125. --- src/curl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/curl.cpp b/src/curl.cpp index 7fa85ee..fa42c2f 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -2833,7 +2833,7 @@ int S3fsCurl::CompleteMultipartPostRequest(const char* tpath, string& upload_id, requestHeaders = curl_slist_sort_insert(requestHeaders, "Content-Type", contype.c_str()); if(!S3fsCurl::IsPublicBucket()){ - string Signature = CalcSignatureV2("POST", "", "", date, resource); + string Signature = CalcSignatureV2("POST", "", contype, date, resource); requestHeaders = curl_slist_sort_insert(requestHeaders, "Authorization", string("AWS " + AWSAccessKeyId + ":" + Signature).c_str()); }