You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/07/13 15:33:54 UTC

[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #2631: ci(services/webdav): Setup integration test for nextcloud

Xuanwo commented on code in PR #2631:
URL: https://github.com/apache/incubator-opendal/pull/2631#discussion_r1262735307


##########
core/src/services/webdav/backend.rs:
##########
@@ -506,29 +512,19 @@ impl WebdavBackend {
         self.client.send(req).await
     }
 
-    async fn webdav_mkcol(
-        &self,
-        abs_path: &str,
-        content_type: Option<&str>,
-        content_disposition: Option<&str>,
-        body: AsyncBody,
-    ) -> Result<Response<IncomingAsyncBody>> {
-        let url = format!("{}/{}", self.endpoint, percent_encode_path(abs_path));
+    async fn webdav_mkcol(&self, path: &str) -> Result<Response<IncomingAsyncBody>> {
+        let p = build_abs_path(&self.root, path);
+
+        let url = format!("{}/{}", self.endpoint, percent_encode_path(&p));
 
         let mut req = Request::builder().method("MKCOL").uri(&url);
         if let Some(auth) = &self.authorization {
             req = req.header(header::AUTHORIZATION, auth);
         }
 
-        if let Some(mime) = content_type {
-            req = req.header(header::CONTENT_TYPE, mime)
-        }
-
-        if let Some(cd) = content_disposition {
-            req = req.header(header::CONTENT_DISPOSITION, cd)
-        }

Review Comment:
   Not part of this PR's scope.



-- 
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: commits-unsubscribe@opendal.apache.org

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