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/09/06 04:51:20 UTC

[GitHub] [incubator-opendal] Xuanwo commented on issue #3014: Creating empty file with writer in webdav for owncloud fails

Xuanwo commented on issue #3014:
URL: https://github.com/apache/incubator-opendal/issues/3014#issuecomment-1707653536

   Thanks for the report!
   
   The root cause here is `tokio::io::copy(&mut reader, &mut writer).await.unwrap();` won't call `write`, so no real `PUT` request has been sent.
   
   I have tested with:
   
   ```rust
   let mut writer = op
       .writer_with("/emptyfile.txt")
       .content_length(data.len() as u64)
       .await
       .unwrap();
   writer.write("").await.unwrap();
   writer.close().await.unwrap();
   ```
   
   I believe this will be fixed after our buffer refactor.


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