You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2024/12/05 09:12:27 UTC

Re: [PR] Fix multipart uploads with checksums on object locked buckets [arrow-rs]

Dandandan commented on code in PR #6794:
URL: https://github.com/apache/arrow-rs/pull/6794#discussion_r1870958271


##########
object_store/src/aws/client.rs:
##########
@@ -617,8 +617,11 @@ impl S3Client {
         location: &Path,
         opts: PutMultipartOpts,
     ) -> Result<MultipartId> {
-        let response = self
-            .request(Method::POST, location)
+        let mut reqquest = self.request(Method::POST, location);
+        if let Some(algorithm) = self.config.checksum {
+            reqquest = reqquest.header(ALGORITHM, &algorithm.to_string().to_uppercase());

Review Comment:
   * AFAIK you can do `algorithm.to_uppercase()` to avoid one allocation
   * I think it's better to match against `algorithm` to create a `SHA256`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org