Skip to content

Commit

Permalink
Update configuration docs and remove overzealous sha256 header check
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisradek committed May 13, 2016
1 parent 881ac0e commit 285c802
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/config.js
Expand Up @@ -79,7 +79,7 @@ require('./credentials/credential_provider_chain');
*
* @!attribute s3DisableBodySigning
* @return [Boolean] whether to disable S3 body signing when using signature version `v4`.
* Defaults to `true`.
* Body signing can only be disabled when using https. Defaults to `true`.
*
* @!attribute useAccelerateEndpoint
* @note This configuration option is only compatible with S3 while accessing
Expand Down Expand Up @@ -208,7 +208,8 @@ AWS.Config = AWS.util.inherit({
* endpoint). Note that setting this configuration option requires an
* `endpoint` to be provided explicitly to the service constructor.
* @option options s3DisableBodySigning [Boolean] whether S3 body signing
* should be disabled when using signature version `v4`. Defaults to `true`.
* should be disabled when using signature version `v4`. Body signing
* can only be disabled when using https. Defaults to `true`.
*
* @option options retryDelayOptions [map] A set of options to configure
* the retry delay on retryable errors. Currently supported options are:
Expand Down
2 changes: 1 addition & 1 deletion lib/services/s3.js
Expand Up @@ -468,7 +468,7 @@ AWS.util.update(AWS.S3.prototype, {
request.service.validateStreamBody(request.httpRequest.body || '');
var headers = request.httpRequest.headers;
// Add the header to anything that isn't a presigned url, unless that presigned url had a body defined
if (headers.hasOwnProperty('X-Amz-Content-Sha256') || !headers.hasOwnProperty('presigned-expires')) {
if (!headers.hasOwnProperty('presigned-expires')) {
headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';
}
},
Expand Down

0 comments on commit 285c802

Please sign in to comment.