Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -9,8 +9,6 @@ use Psr\Http\Message\RequestInterface;
*/
class S3SignatureV4 extends SignatureV4
{
const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD';
/**
* Always add a x-amz-content-sha-256 for data integrity.
*/
@@ -34,7 +32,8 @@ class S3SignatureV4 extends SignatureV4
public function presign(
RequestInterface $request,
CredentialsInterface $credentials,
$expires
$expires,
array $options = []
) {
if (!$request->hasHeader('x-amz-content-sha256')) {
$request = $request->withHeader(
@@ -43,7 +42,7 @@ class S3SignatureV4 extends SignatureV4
);
}
return parent::presign($request, $credentials, $expires);
return parent::presign($request, $credentials, $expires, $options);
}
/**
@@ -52,7 +51,7 @@ class S3SignatureV4 extends SignatureV4
*/
protected function getPresignedPayload(RequestInterface $request)
{
return self::UNSIGNED_PAYLOAD;
return SignatureV4::UNSIGNED_PAYLOAD;
}
/**
@@ -60,6 +59,10 @@ class S3SignatureV4 extends SignatureV4
*/
protected function createCanonicalizedPath($path)
{
return '/' . ltrim($path, '/');
// Only remove one slash in case of keys that have a preceding slash
if (substr($path, 0, 1) === '/') {
$path = substr($path, 1);
}
return '/' . $path;
}
}