erickguan commented on code in PR #7637:
URL: https://github.com/apache/opendal/pull/7637#discussion_r3456338320
##########
core/services/webdav/src/backend.rs:
##########
@@ -153,6 +153,23 @@ impl WebdavBuilder {
}
self
}
+
+ /// Disable conditional read headers on GET requests.
+ ///
+ /// By default, OpenDAL advertises and sends the RFC 7232 headers
+ /// `If-Match`, `If-None-Match`, `If-Modified-Since` and
+ /// `If-Unmodified-Since` when callers ask for conditional reads.
+ ///
+ /// Some WebDAV-compatible servers (e.g., nginx-dav) don't return
+ /// ETags in PROPFIND or don't honor these conditions on GET.
+ /// Enable this option to drop the four `read_with_if_*` capabilities
+ /// so callers fail fast instead of silently losing the condition.
Review Comment:
```suggestion
/// Set this option to disable conditional read, specifically, disabling
capabilities:
/// - `read_with_if_match`
/// - `read_with_if_none_match`
/// - `read_with_if_modified_since`
/// - `read_with_if_unmodified_since`
/// so callers fail fast instead of silently losing the condition.
```
I don't understand the last sentence. Is OpenDAL sending data to a webdav
server and webdav server will respond with an error? Can we send data to a
webdav server without an error with this flag?
Backend has this code:
```rust
fn read(&self, ctx: &OperationContext, path: &str, args: OpRead) ->
Result<Self::Reader> {
let output: oio::StreamReader<WebdavReader> = {
Ok(oio::StreamReader::new(WebdavReader::new(
```
--
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]