@smithy/middleware-compression
Advanced tools
Comparing version 3.0.12 to 3.1.0
@@ -61,2 +61,3 @@ var __defProp = Object.defineProperty; | ||
// src/compressionMiddleware.ts | ||
var import_core = require("@smithy/core"); | ||
var import_protocol_http = require("@smithy/protocol-http"); | ||
@@ -90,3 +91,3 @@ | ||
// src/compressionMiddleware.ts | ||
var compressionMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next) => async (args) => { | ||
var compressionMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => { | ||
if (!import_protocol_http.HttpRequest.isInstance(args.request)) { | ||
@@ -131,2 +132,5 @@ return next(args); | ||
} | ||
if (updatedHeaders["content-encoding"].includes("gzip")) { | ||
(0, import_core.setFeature)(context, "GZIP_REQUEST_COMPRESSION", "L"); | ||
} | ||
break; | ||
@@ -133,0 +137,0 @@ } |
@@ -0,1 +1,2 @@ | ||
import { setFeature } from "@smithy/core"; | ||
import { HttpRequest } from "@smithy/protocol-http"; | ||
@@ -6,3 +7,3 @@ import { compressStream } from "./compressStream"; | ||
import { isStreaming } from "./isStreaming"; | ||
export const compressionMiddleware = (config, middlewareConfig) => (next) => async (args) => { | ||
export const compressionMiddleware = (config, middlewareConfig) => (next, context) => async (args) => { | ||
if (!HttpRequest.isInstance(args.request)) { | ||
@@ -50,2 +51,5 @@ return next(args); | ||
} | ||
if (updatedHeaders["content-encoding"].includes("gzip")) { | ||
setFeature(context, "GZIP_REQUEST_COMPRESSION", "L"); | ||
} | ||
break; | ||
@@ -52,0 +56,0 @@ } |
{ | ||
"name": "@smithy/middleware-compression", | ||
"version": "3.0.12", | ||
"version": "3.1.0", | ||
"description": "Middleware and Plugin for request compression.", | ||
@@ -18,8 +18,9 @@ "scripts": { | ||
"dependencies": { | ||
"@smithy/core": "^2.5.0", | ||
"@smithy/is-array-buffer": "^3.0.0", | ||
"@smithy/node-config-provider": "^3.1.8", | ||
"@smithy/protocol-http": "^4.1.4", | ||
"@smithy/types": "^3.5.0", | ||
"@smithy/node-config-provider": "^3.1.9", | ||
"@smithy/protocol-http": "^4.1.5", | ||
"@smithy/types": "^3.6.0", | ||
"@smithy/util-config-provider": "^3.0.0", | ||
"@smithy/util-middleware": "^3.0.7", | ||
"@smithy/util-middleware": "^3.0.8", | ||
"@smithy/util-utf8": "^3.0.0", | ||
@@ -26,0 +27,0 @@ "fflate": "0.8.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36002
486
10
2
1
+ Added@smithy/core@^2.5.0
+ Added@smithy/abort-controller@3.1.8(transitive)
+ Added@smithy/core@2.5.3(transitive)
+ Added@smithy/fetch-http-handler@4.1.1(transitive)
+ Added@smithy/middleware-serde@3.0.10(transitive)
+ Added@smithy/node-http-handler@3.3.1(transitive)
+ Added@smithy/querystring-builder@3.0.10(transitive)
+ Added@smithy/util-base64@3.0.0(transitive)
+ Added@smithy/util-body-length-browser@3.0.0(transitive)
+ Added@smithy/util-hex-encoding@3.0.0(transitive)
+ Added@smithy/util-stream@3.3.1(transitive)
+ Added@smithy/util-uri-escape@3.0.0(transitive)
Updated@smithy/protocol-http@^4.1.5
Updated@smithy/types@^3.6.0