Compare commits

...

1 Commits

Author SHA1 Message Date
Rahul Padigela a383938570 fix: auth v4 canonical request resource
fixes #177
2017-01-27 11:59:29 -08:00
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
'use strict'; // eslint-disable-line strict 'use strict'; // eslint-disable-line strict
const crypto = require('crypto'); const crypto = require('crypto');
const url = require('url');
const createCanonicalRequest = require('./createCanonicalRequest'); const createCanonicalRequest = require('./createCanonicalRequest');
@ -20,7 +21,7 @@ function constructStringToSign(params) {
const canonicalReqResult = createCanonicalRequest({ const canonicalReqResult = createCanonicalRequest({
pHttpVerb: request.method, pHttpVerb: request.method,
pResource: request.path, pResource: url.parse(request.path).pathname,
pQuery: query, pQuery: query,
pHeaders: request.headers, pHeaders: request.headers,
pSignedHeaders: signedHeaders, pSignedHeaders: signedHeaders,