Skip to content

Commit

Permalink
Deactivate chunked body in S3 (#911)
Browse files Browse the repository at this point in the history
* Deactivate chunked body in S3

* Reword doc

* Use array to define Signer options

* Fix tests
  • Loading branch information
jderusse authored Jan 13, 2021
1 parent 4476e81 commit 71ad745
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## NOT RELEASED

### Added

- Added option `sendChunkedBody` dedicated to S3.

## 1.7.2

- Make sure we can get credentials even if the cache storage fails
Expand Down
4 changes: 4 additions & 0 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ final class Configuration

// S3 specific option
public const OPTION_PATH_STYLE_ENDPOINT = 'pathStyleEndpoint';
public const OPTION_SEND_CHUNKED_BODY = 'sendChunkedBody';

private const AVAILABLE_OPTIONS = [
self::OPTION_REGION => true,
Expand All @@ -49,6 +50,7 @@ final class Configuration
self::OPTION_ROLE_SESSION_NAME => true,
self::OPTION_CONTAINER_CREDENTIALS_RELATIVE_URI => true,
self::OPTION_PATH_STYLE_ENDPOINT => true,
self::OPTION_SEND_CHUNKED_BODY => true,
];

// Put fallback options into groups to avoid mixing of provided config and environment variables
Expand Down Expand Up @@ -79,6 +81,7 @@ final class Configuration
// https://docs.aws.amazon.com/general/latest/gr/rande.html
self::OPTION_ENDPOINT => 'https://%service%.%region%.amazonaws.com',
self::OPTION_PATH_STYLE_ENDPOINT => 'false',
self::OPTION_SEND_CHUNKED_BODY => 'true',
];

private $data = [];
Expand Down Expand Up @@ -120,6 +123,7 @@ public static function optionExists(string $optionName): bool
* |self::OPTION_SHARED_CONFIG_FILE
* |self::OPTION_ENDPOINT
* |self::OPTION_PATH_STYLE_ENDPOINT
* |self::OPTION_SEND_CHUNKED_BODY
* ? string
* : ?string
* )
Expand Down

0 comments on commit 71ad745

Please sign in to comment.