This is an automated email from the ASF dual-hosted git repository.

tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f441eedf Fix multipart uploads on Minio (#2731)
5f441eedf is described below

commit 5f441eedff2b7621c46aded8b1caf3b665b8e8a9
Author: Artjoms Iskovs <[email protected]>
AuthorDate: Thu Sep 15 17:22:53 2022 +0100

    Fix multipart uploads on Minio (#2731)
    
    The official Minio SDK uses "uploads=" as the URL when it initiates a
    multipart upload instead of "uploads". This affects the AWSV4 signature
    and causes object_store to fail a signature check when initiating the
    upload to Minio.
    
    It's possible that this contradicts the AWS S3 API docs:
    
https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html#API_CreateMultipartUpload_RequestSyntax
    and we need to instead keep the URL as `?uploads` and
    change the URL that goes into the signature instead.
---
 object_store/src/aws/client.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs
index d8ab3bba8..f800fec3d 100644
--- a/object_store/src/aws/client.rs
+++ b/object_store/src/aws/client.rs
@@ -411,7 +411,7 @@ impl S3Client {
     pub async fn create_multipart(&self, location: &Path) -> 
Result<MultipartId> {
         let credential = self.get_credential().await?;
         let url = format!(
-            "{}/{}/{}?uploads",
+            "{}/{}/{}?uploads=",
             self.config.endpoint,
             self.config.bucket,
             encode_path(location)

Reply via email to