Skip to content

Commit

Permalink
allow unsigned GET request (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenels authored Oct 26, 2023
1 parent 0cc49cf commit db78686
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/s3s/src/ops/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ impl SignatureContext<'_> {
let payload = sig_v4::Payload::MultipleChunks;
sig_v4::create_canonical_request(method, uri_path, query_strings, &headers, payload)
} else if matches!(*self.req_method, Method::GET | Method::HEAD) {
let payload = sig_v4::Payload::Empty;
let payload = if matches!(amz_content_sha256, AmzContentSha256::UnsignedPayload) {
sig_v4::Payload::Unsigned
} else {
sig_v4::Payload::Empty
};
sig_v4::create_canonical_request(method, uri_path, query_strings, &headers, payload)
} else {
let bytes = super::extract_full_body(self.content_length, self.req_body).await?;
Expand Down

0 comments on commit db78686

Please sign in to comment.