Skip to content

Commit

Permalink
do not percent_encode_path in xml body
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Feb 18, 2024
1 parent 5f99a19 commit 3091645
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/services/azblob/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use base64::prelude::BASE64_STANDARD;
use base64::prelude::BASE64_URL_SAFE;
use base64::Engine;
use bytes::Bytes;
use http::header::HeaderName;
Expand Down Expand Up @@ -386,7 +386,7 @@ impl AzblobCore {
let p = build_abs_path(&self.root, path);

let encoded_block_id: String =
percent_encode_path(&BASE64_STANDARD.encode(block_id.to_string()));
percent_encode_path(&BASE64_URL_SAFE.encode(block_id.as_bytes()));
let url = format!(
"{}/{}/{}?comp=block&blockid={}",
self.endpoint,
Expand Down Expand Up @@ -454,8 +454,7 @@ impl AzblobCore {
latest: block_ids
.into_iter()
.map(|block_id| {
let encoded_block_id: String =
percent_encode_path(&BASE64_STANDARD.encode(block_id.to_string()));
let encoded_block_id: String = BASE64_URL_SAFE.encode(block_id.as_bytes());
encoded_block_id
})
.collect(),
Expand Down

0 comments on commit 3091645

Please sign in to comment.