Skip to content

Commit

Permalink
tentative fix without body for sigV4
Browse files Browse the repository at this point in the history
  • Loading branch information
frsechet committed Jul 3, 2019
1 parent e70db4b commit 9cdad89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manual_test_websocket/main/test/e2e/ws.e2e.js
Expand Up @@ -375,7 +375,7 @@ describe('serverless', () => {
await createClient();
const c2 = await createClient();
const url = new URL(endpoint);
const signature = { service: 'execute-api', host: url.host, path: `${url.pathname}/@connections/${c2.id}`, method: 'DELETE', body: 'Hello World!', headers: { 'Content-Type': 'text/plain'/* 'application/text' */ } };
const signature = { service: 'execute-api', host: url.host, path: `${url.pathname}/@connections/${c2.id}`, method: 'DELETE', headers: { 'Content-Type': 'text/plain'/* 'application/text' */ } };
aws4.sign(signature, { accessKeyId: cred.accessKeyId, secretAccessKey: cred.secretAccessKey });
const res = await req.del(signature.path.replace(url.pathname, '')).set('X-Amz-Date', signature.headers['X-Amz-Date']).set('Authorization', signature.headers.Authorization).set('Content-Type', signature.headers['Content-Type']);

Expand All @@ -387,7 +387,7 @@ describe('serverless', () => {
const cId = c.id;
c.ws.close();
const url = new URL(endpoint);
const signature = { service: 'execute-api', host: url.host, path: `${url.pathname}/@connections/${cId}`, method: 'DELETE', body: 'Hello World!', headers: { 'Content-Type': 'text/plain'/* 'application/text' */ } };
const signature = { service: 'execute-api', host: url.host, path: `${url.pathname}/@connections/${cId}`, method: 'DELETE', headers: { 'Content-Type': 'text/plain'/* 'application/text' */ } };
aws4.sign(signature, { accessKeyId: cred.accessKeyId, secretAccessKey: cred.secretAccessKey });
const res = await req.del(signature.path.replace(url.pathname, '')).set('X-Amz-Date', signature.headers['X-Amz-Date']).set('Authorization', signature.headers.Authorization).set('Content-Type', signature.headers['Content-Type']);

Expand Down

0 comments on commit 9cdad89

Please sign in to comment.