@aws-sdk/middleware-websocket 3.972.6 → 3.972.7

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
@@ -366,7 +366,10 @@ class EventStreamPayloadHandler {
366
366
  const placeHolderStream = new TransformStream();
367
367
  request.body = placeHolderStream.readable;
368
368
  const match = (headers?.authorization ?? "").match(/Signature=(\w+)$/);
369
- const priorSignature = (match ?? [])[1] ?? (query && query["X-Amz-Signature"]) ?? "";
369
+ let priorSignature = (match ?? [])[1] ?? (query && query["X-Amz-Signature"]) ?? "";
370
+ if (context.__staticSignature) {
371
+ priorSignature = "";
372
+ }
370
373
  const signingStream = new EventSigningTransformStream(priorSignature, await this.messageSigner(), this.eventStreamCodec, this.systemClockOffsetProvider);
371
374
  payload.pipeThrough(signingStream).pipeThrough(placeHolderStream);
372
375
  let result;
@@ -18,7 +18,10 @@ export class EventStreamPayloadHandler {
18
18
  const placeHolderStream = new TransformStream();
19
19
  request.body = placeHolderStream.readable;
20
20
  const match = (headers?.authorization ?? "").match(/Signature=(\w+)$/);
21
- const priorSignature = (match ?? [])[1] ?? (query && query["X-Amz-Signature"]) ?? "";
21
+ let priorSignature = (match ?? [])[1] ?? (query && query["X-Amz-Signature"]) ?? "";
22
+ if (context.__staticSignature) {
23
+ priorSignature = "";
24
+ }
22
25
  const signingStream = new EventSigningTransformStream(priorSignature, await this.messageSigner(), this.eventStreamCodec, this.systemClockOffsetProvider);
23
26
  payload.pipeThrough(signingStream).pipeThrough(placeHolderStream);
24
27
  let result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-websocket",
3
- "version": "3.972.6",
3
+ "version": "3.972.7",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",