You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "KiSetsuFu-PuLiN (via GitHub)" <gi...@apache.org> on 2026/09/13 10:13:57 UTC

[I] bug: WebDAV writer rejects streaming writes larger than one buffer [opendal]

KiSetsuFu-PuLiN opened a new issue, #8291:
URL: https://github.com/apache/opendal/issues/8291

   ### OpenDAL version or commit
   
   v0.58.1 (the same one-shot writer is still present on main)
   
   ### Affected service or component
   
   services/webdav against a dav-server WebDAV endpoint
   
   ### Describe the bug
   
   The WebDAV writer is a one-shot writer (`oio::OneShotWriter`). One writer only accepts a single `write` call, so any streaming write that exceeds one internal buffer (256 KiB) fails with:
   
   ```
   Unsupported (permanent) at write => OneShotWriter doesn't support multiple write
   Context:
     service: webdav
     path: ...
     size: 262144
     written: 262144
   ```
   
   `FuturesAsyncWriter` (returned by `Operator::writer(...).into_futures_async_write()`) flushes its 256 KiB buffer by calling `write` again, which the one-shot writer rejects. As a result, a single writer cannot upload files larger than 256 KiB.
   
   ### Steps to Reproduce
   
   ```rust
   use futures::AsyncWriteExt;
   
   let mut writer = op.writer("big.bin").await?.into_futures_async_write();
   writer.write_all(&vec![0u8; 600 * 1024]).await?; // fails with the error above
   writer.close().await?;
   ```
   
   Reproduced against a real `dav-server` WebDAV endpoint (`dav_server::localfs::LocalFs`) through `opendal::services::Webdav`.
   
   ### Actual Behavior
   
   The second `write` on the same writer fails with `Unsupported (permanent) at write => OneShotWriter doesn't support multiple write`.
   
   ### Expected Behavior
   
   A single writer accepts multiple writes and uploads the data in ordered chunks (for example, the first chunk with a regular PUT and the following chunks with partial PUTs carrying `Content-Range`), and the service reports `write_can_multi = true`.
   
   ### Additional Context
   
   `write_can_multi` is currently `false` for webdav even though `Operator::writer` hands users a writer they can write to multiple times. `write_total_max_size` / server support for partial PUTs may need to be documented as part of the fix.
   
   ### Reproduction confirmation
   
   - [x] I reproduced this issue against the affected component. For a service-specific report, I used the actual service rather than only a mock, emulator, or source-code analysis.
   
   ### Are you willing to submit a PR to fix this bug?
   
   - [x] Yes, I would like to submit a PR.
   


-- 
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.apache.org

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