weihanglo opened a new pull request, #7177:
URL: https://github.com/apache/opendal/pull/7177

   feat(webdav): disable_create_dir for servers without PROPFIND
   
   Some WebDAV-compatible servers like bazel-remote don't implement the
   full WebDAV protocol. Specifically, they don't support the PROPFIND
   method and don't require explicit directory creation before writing
   files.
   
   Currently, OpenDAL's WebDAV `write()` always calls `webdav_mkcol()`
   before writing to ensure parent directories exist. This uses PROPFIND
   to check directory existence, which fails on servers that don't
   support it. For example, bazel-remote returns `405 Method Not Allowed.
   
   This adds a new `disable_create_dir` configuration option that skips
   the automatic parent directory creation in write operations.
   
   * Builder API:
     ```rust
     let op = Webdav::default()
         .endpoint("http://bazel-remote:8080";)
         .disable_create_dir(true)
         .build()?;
     ```
   
   * Via URI:
     ```
     webdav://bazel-remote:8080?disable_create_dir=true
     ```
   
   * Environment variable:
     ```
     OPENDAL_WEBDAV_DISABLE_CREATE_DIR=true
   
   
   cc <https://github.com/mozilla/sccache/issues/2278>


-- 
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]

Reply via email to