@azure/storage-blob 12.9.0-alpha.20220215.3 → 12.9.0-alpha.20220302.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  ### Bugs Fixed
10
10
 
11
+ - Set correct content length in requests for uploading operations to avoid unexpected failure if customized content length is incorrect.
12
+
11
13
  ### Other Changes
12
14
 
13
15
  ## 12.9.0-beta.3 (2022-02-11)
package/dist/index.js CHANGED
@@ -9109,8 +9109,7 @@ const encryptionKeySha256 = {
9109
9109
  const encryptionAlgorithm = {
9110
9110
  parameterPath: ["options", "encryptionAlgorithm"],
9111
9111
  mapper: {
9112
- defaultValue: "AES256",
9113
- isConstant: true,
9112
+ isConstant: false,
9114
9113
  serializedName: "x-ms-encryption-algorithm",
9115
9114
  type: {
9116
9115
  name: "String"
@@ -14843,7 +14842,9 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
14843
14842
  */
14844
14843
  signRequest(request) {
14845
14844
  request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
14846
- if (request.body && typeof request.body === "string" && request.body.length > 0) {
14845
+ if (request.body &&
14846
+ (typeof request.body === "string" || request.body !== undefined) &&
14847
+ request.body.length > 0) {
14847
14848
  request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
14848
14849
  }
14849
14850
  const stringToSign = [