@aws-sdk/eventstream-handler-node
Advanced tools
Comparing version 3.609.0 to 3.620.0
@@ -99,2 +99,3 @@ "use strict"; | ||
async handle(next, args, context = {}) { | ||
var _a, _b; | ||
const request = args.request; | ||
@@ -109,11 +110,4 @@ const { body: payload, query } = request; | ||
}); | ||
let result; | ||
try { | ||
result = await next(args); | ||
} catch (e) { | ||
request.body.end(); | ||
throw e; | ||
} | ||
const match = (request.headers["authorization"] || "").match(/Signature=([\w]+)$/); | ||
const priorSignature = (match || [])[1] || query && query["X-Amz-Signature"] || ""; | ||
const match = (_b = (_a = request.headers) == null ? void 0 : _a.authorization) == null ? void 0 : _b.match(/Signature=([\w]+)$/); | ||
const priorSignature = (match == null ? void 0 : match[1]) ?? (query == null ? void 0 : query["X-Amz-Signature"]) ?? ""; | ||
const signingStream = new EventSigningStream({ | ||
@@ -130,2 +124,9 @@ priorSignature, | ||
}); | ||
let result; | ||
try { | ||
result = await next(args); | ||
} catch (e) { | ||
request.body.end(); | ||
throw e; | ||
} | ||
return result; | ||
@@ -132,0 +133,0 @@ } |
@@ -20,12 +20,4 @@ import { EventStreamCodec } from "@smithy/eventstream-codec"; | ||
}); | ||
let result; | ||
try { | ||
result = await next(args); | ||
} | ||
catch (e) { | ||
request.body.end(); | ||
throw e; | ||
} | ||
const match = (request.headers["authorization"] || "").match(/Signature=([\w]+)$/); | ||
const priorSignature = (match || [])[1] || (query && query["X-Amz-Signature"]) || ""; | ||
const match = request.headers?.authorization?.match(/Signature=([\w]+)$/); | ||
const priorSignature = match?.[1] ?? query?.["X-Amz-Signature"] ?? ""; | ||
const signingStream = new EventSigningStream({ | ||
@@ -42,4 +34,12 @@ priorSignature, | ||
}); | ||
let result; | ||
try { | ||
result = await next(args); | ||
} | ||
catch (e) { | ||
request.body.end(); | ||
throw e; | ||
} | ||
return result; | ||
} | ||
} |
{ | ||
"name": "@aws-sdk/eventstream-handler-node", | ||
"version": "3.609.0", | ||
"version": "3.620.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", |
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
26431
346