@aws-sdk/middleware-sdk-s3 3.616.0 → 3.617.0

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/dist-cjs/index.js CHANGED
@@ -469,6 +469,9 @@ var throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config) => (next, con
469
469
  return (0, import_util_stream.headStream)(stream, MAX_BYTES_TO_INSPECT);
470
470
  }
471
471
  });
472
+ if (typeof (bodyCopy == null ? void 0 : bodyCopy.destroy) === "function") {
473
+ bodyCopy.destroy();
474
+ }
472
475
  const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));
473
476
  if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {
474
477
  const err = new Error("S3 aborted request");
@@ -27,6 +27,9 @@ export const throw200ExceptionsMiddleware = (config) => (next, context) => async
27
27
  return headStream(stream, MAX_BYTES_TO_INSPECT);
28
28
  },
29
29
  });
30
+ if (typeof bodyCopy?.destroy === "function") {
31
+ bodyCopy.destroy();
32
+ }
30
33
  const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));
31
34
  if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {
32
35
  const err = new Error("S3 aborted request");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-sdk-s3",
3
- "version": "3.616.0",
3
+ "version": "3.617.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-sdk-s3",