@aws-sdk/middleware-sdk-s3
Advanced tools
Comparing version 3.749.0 to 3.750.0
@@ -60,2 +60,3 @@ "use strict"; | ||
var CONTENT_LENGTH_HEADER = "content-length"; | ||
var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; | ||
function checkContentLengthHeader() { | ||
@@ -65,3 +66,3 @@ return (next, context) => async (args) => { | ||
if (import_protocol_http.HttpRequest.isInstance(request)) { | ||
if (!(CONTENT_LENGTH_HEADER in request.headers)) { | ||
if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { | ||
const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; | ||
@@ -68,0 +69,0 @@ if (typeof context?.logger?.warn === "function" && !(context.logger instanceof import_smithy_client.NoOpLogger)) { |
import { HttpRequest } from "@smithy/protocol-http"; | ||
import { NoOpLogger } from "@smithy/smithy-client"; | ||
const CONTENT_LENGTH_HEADER = "content-length"; | ||
const DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; | ||
export function checkContentLengthHeader() { | ||
@@ -8,3 +9,3 @@ return (next, context) => async (args) => { | ||
if (HttpRequest.isInstance(request)) { | ||
if (!(CONTENT_LENGTH_HEADER in request.headers)) { | ||
if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { | ||
const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; | ||
@@ -11,0 +12,0 @@ if (typeof context?.logger?.warn === "function" && !(context.logger instanceof NoOpLogger)) { |
{ | ||
"name": "@aws-sdk/middleware-sdk-s3", | ||
"version": "3.749.0", | ||
"version": "3.750.0", | ||
"scripts": { | ||
@@ -30,14 +30,14 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/core": "3.749.0", | ||
"@aws-sdk/core": "3.750.0", | ||
"@aws-sdk/types": "3.734.0", | ||
"@aws-sdk/util-arn-parser": "3.723.0", | ||
"@smithy/core": "^3.1.3", | ||
"@smithy/core": "^3.1.4", | ||
"@smithy/node-config-provider": "^4.0.1", | ||
"@smithy/protocol-http": "^5.0.1", | ||
"@smithy/signature-v4": "^5.0.1", | ||
"@smithy/smithy-client": "^4.1.4", | ||
"@smithy/smithy-client": "^4.1.5", | ||
"@smithy/types": "^4.1.0", | ||
"@smithy/util-config-provider": "^4.0.0", | ||
"@smithy/util-middleware": "^4.0.1", | ||
"@smithy/util-stream": "^4.1.0", | ||
"@smithy/util-stream": "^4.1.1", | ||
"@smithy/util-utf8": "^4.0.0", | ||
@@ -44,0 +44,0 @@ "tslib": "^2.6.2" |
91108
1949
+ Added@aws-sdk/core@3.750.0(transitive)
+ Addedstrnum@1.1.1(transitive)
- Removed@aws-sdk/core@3.749.0(transitive)
- Removedstrnum@1.0.5(transitive)
Updated@aws-sdk/core@3.750.0
Updated@smithy/core@^3.1.4
Updated@smithy/smithy-client@^4.1.5
Updated@smithy/util-stream@^4.1.1