Skip to content

Commit 961ff9b

Browse files
authored
Merge pull request #11 from shawnhankim/lib
fix: payload hash
2 parents 5949082 + 2305bac commit 961ff9b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/awssig4.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ function awsHeaderDate(r) {
276276
* @returns {string} payload hash
277277
*/
278278
function awsHeaderPayloadHash(r) {
279-
const reqBody = (r.variables.request_body === 'undefined') ? '':
280-
r.variables.request_body;
279+
const reqBody = r.variables.request_body ? r.variables.request_body: '';
281280
const payloadHash = mod_hmac.createHash('sha256', 'utf8')
282281
.update(reqBody)
283282
.digest('hex');

0 commit comments

Comments
 (0)