We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6161d1e + 4429c7b commit 5caea33Copy full SHA for 5caea33
src/rgw/rgw_rest_s3.cc
@@ -6368,7 +6368,11 @@ AWSSignerV4::prepare(const DoutPrefixProvider *dpp,
6368
if (opt_content) {
6369
content_hash = rgw::auth::s3::calc_v4_payload_hash(opt_content->to_str());
6370
extra_headers["x-amz-content-sha256"] = content_hash;
6371
-
+ } else {
6372
+ /* Some S3-compatible services require x-amz-content-sha256 header to always
6373
+ * be present and included in the signature, even for unsigned payload.
6374
+ * AWS S3 specification states that this header is required for all requests. */
6375
+ extra_headers["x-amz-content-sha256"] = AWS4_UNSIGNED_PAYLOAD_HASH;
6376
}
6377
6378
/* craft canonical headers */
0 commit comments