You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/03/19 15:37:51 UTC

[incubator-opendal] branch fix-append created (now 778b49c2)

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

xuanwo pushed a change to branch fix-append
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


      at 778b49c2 fix(services/s3): UploadId should be percent encoded

This branch includes the following new commits:

     new 778b49c2 fix(services/s3): UploadId should be percent encoded

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-opendal] 01/01: fix(services/s3): UploadId should be percent encoded

Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch fix-append
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit 778b49c25fd555bee940938f32d1bc57c580b9ce
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Sun Mar 19 23:37:04 2023 +0800

    fix(services/s3): UploadId should be percent encoded
    
    Some services like R2 could return a upload id with space
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 .devcontainer/devcontainer.json | 2 +-
 core/src/services/s3/backend.rs | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index fd7ffe80..7253f761 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -2,7 +2,7 @@
 	"name": "OpenDAL",
 	"image": "ghcr.io/apache/opendal-devtools:latest",
 	"mounts": [
-		"source=${localEnv:HOME}/.cargo/registry,target=/opt/rust/cargo/registry,type=bind,consistency=cached",
+		"source=${localEnv:HOME}/.cargo/registry,target=/opt/rust/cargo/registry,type=bind,consistency=cached"
 	],
 	"remoteUser": "builder",
 	"updateRemoteUserUID": true,
diff --git a/core/src/services/s3/backend.rs b/core/src/services/s3/backend.rs
index 633a633d..5cf12bfd 100644
--- a/core/src/services/s3/backend.rs
+++ b/core/src/services/s3/backend.rs
@@ -1505,7 +1505,7 @@ impl S3Backend {
             self.endpoint,
             percent_encode_path(&p),
             part_number,
-            upload_id
+            percent_encode_path(upload_id)
         );
 
         let mut req = Request::put(&url);
@@ -1535,7 +1535,7 @@ impl S3Backend {
             "{}/{}?uploadId={}",
             self.endpoint,
             percent_encode_path(&p),
-            upload_id
+            percent_encode_path(upload_id)
         );
 
         let req = Request::post(&url);