Skip to content

Commit

Permalink
Fixing the build
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Nov 24, 2014
1 parent 83587f7 commit 4ffd409
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Aws/Common/Signature/SignatureV4.php
Expand Up @@ -231,9 +231,11 @@ protected function getPayload(RequestInterface $request)
}

if ($request instanceof EntityEnclosingRequestInterface) {
return $request->getMethod() == 'POST' && count($request->getPostFields())
? hash('sha256', (string) $request->getPostFields())
: Stream::getHash($request->getBody(), 'sha256');
if ($request->getMethod() == 'POST' && count($request->getPostFields())) {
return hash('sha256', (string) $request->getPostFields());
} elseif ($body = $request->getBody()) {
return Stream::getHash($request->getBody(), 'sha256');
}
}

return self::DEFAULT_PAYLOAD;
Expand Down

0 comments on commit 4ffd409

Please sign in to comment.