From 9f8ff8ccc2792768ef2662aff25fe32d6da2d753 Mon Sep 17 00:00:00 2001 From: Gustavo Gondim Date: Mon, 23 Jul 2018 23:44:36 -0300 Subject: [PATCH 1/2] Changing Azure SharedKey HeaderConstants.CONTENT_LENGTH to 1 in favor of #546 --- lib/pkgcloud/azure/utils/sharedkey.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkgcloud/azure/utils/sharedkey.js b/lib/pkgcloud/azure/utils/sharedkey.js index 0f795d37f..29327986d 100644 --- a/lib/pkgcloud/azure/utils/sharedkey.js +++ b/lib/pkgcloud/azure/utils/sharedkey.js @@ -53,7 +53,7 @@ SharedKey.prototype.signRequest = function (req) { req.headers['x-ms-version'] = HeaderConstants.TARGET_STORAGE_VERSION; if (!req.headers[HeaderConstants.CONTENT_LENGTH]) { - req.headers[HeaderConstants.CONTENT_LENGTH] = '0'; + req.headers[HeaderConstants.CONTENT_LENGTH] = '1'; } var stringToSign = From 5adbccedfb0f7752230153b9d19fdc4ca685217d Mon Sep 17 00:00:00 2001 From: Gustavo Gondim Date: Mon, 23 Jul 2018 23:46:07 -0300 Subject: [PATCH 2/2] Changing Azure constant TARGET_STORAGE_VERSION in favor to fix #546 --- lib/pkgcloud/azure/utils/constants.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pkgcloud/azure/utils/constants.js b/lib/pkgcloud/azure/utils/constants.js index 752a205fa..a0b54eede 100644 --- a/lib/pkgcloud/azure/utils/constants.js +++ b/lib/pkgcloud/azure/utils/constants.js @@ -2045,7 +2045,7 @@ var Constants = { * @const * @type {string} */ - TARGET_STORAGE_VERSION: '2011-08-18', + TARGET_STORAGE_VERSION: '2015-12-11', /** * The UserAgent header. @@ -2559,4 +2559,4 @@ var Constants = { } }; -module.exports = Constants; \ No newline at end of file +module.exports = Constants;