Xuanwo commented on code in PR #5979:
URL: https://github.com/apache/opendal/pull/5979#discussion_r2031318143
##########
core/src/services/azblob/core.rs:
##########
@@ -641,10 +570,10 @@ impl AzblobCore {
}
pub async fn azblob_batch_delete(&self, paths: &[String]) ->
Result<Response<Buffer>> {
- let url = format!(
- "{}/{}?restype=container&comp=batch",
- self.endpoint, self.container
- );
+ let url = QueryPairsWriter::new(&format!("{}/{}", self.endpoint,
self.container))
Review Comment:
Let's revert this change.
##########
core/src/services/azblob/core.rs:
##########
@@ -582,18 +523,8 @@ impl AzblobCore {
let source = build_abs_path(&self.root, from);
let target = build_abs_path(&self.root, to);
- let source = format!(
- "{}/{}/{}",
- self.endpoint,
- self.container,
- percent_encode_path(&source)
- );
- let target = format!(
- "{}/{}/{}",
- self.endpoint,
- self.container,
- percent_encode_path(&target)
- );
+ let source = self.build_path_url(&source);
Review Comment:
`source` and `target` has been `build_abs_path`
##########
core/src/services/azblob/core.rs:
##########
@@ -171,34 +171,28 @@ impl AzblobCore {
}
impl AzblobCore {
+ fn build_path_url(&self, path: &str) -> String {
+ format!(
+ "{}/{}/{}",
+ self.endpoint,
+ self.container,
+ percent_encode_path(&build_abs_path(&self.root, path))
+ )
+ }
+
pub fn azblob_get_blob_request(
&self,
path: &str,
range: BytesRange,
args: &OpRead,
) -> Result<Request<Buffer>> {
- let p = build_abs_path(&self.root, path);
+ let mut url = QueryPairsWriter::new(&self.build_path_url(path));
Review Comment:
Let's revert this change.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]