Description: During uploading a spreadsheet (ods) in LibreOffice Calc 7.4 with WebDAV, the upload fails. The spreadsheet in the server has not been updated. The same occurs with odt documents in Writer. This is likely caused by the Curl backend because before when the Neon was used, it worked fine. Unfortunately the Neon cannot be chosen because that has been removed from the code permanently. Steps to Reproduce: 1. Open a file from a Vibe 4.0.6 WebDAV server 2. Save 3. Reopen Actual Results: The file fails to update, keeps the original state after reload. Expected Results: The file have to be saved properly. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 7.4.1.2 (x64) / LibreOffice Community Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0 CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-GB Calc: CL
It could be interesting to have more details about WebDAV server. Michael: thought you might be interested in this one since it concerns WebDAV and the new Curl way.
problem is that the server sends a "HTTP/1.1 100" response with "Transfer-Encoding: chunked" and libcurl cannot handle it. one possible fix: https://gerrit.libreoffice.org/c/core/+/146067
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/30ca48f4dc0e65a3798e6b21574bc80f6d4953fa tdf#152493 ucb WebDAV: fix upload using HTTP 1.0 fallback It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Michael Stahl (allotropia) from comment #2) > "Transfer-Encoding: chunked" and libcurl cannot handle it. I don't know how this may be related, but it seems that at least something is supported in libcurl: https://pragmaticjoe.gitlab.io/posts/2016-09-04-http-chunked-encoding-using-c-and-libcurl/ which deals with more problematic case of not having all the data in advance, but also mentions that when everything is at hand, "you just need to add the header “Transfer-Encoding: chunked” to the request, and curl will take care of everything after that".
Regression from commit 023ebf17898db4bca63129f079fd90b5cf76c1a9 "ucb: remove --with-webdav=neon", i.e. Neon has no such upload problem, so removing it meant losing the previous workaround.
(In reply to Mike Kaganski from comment #4) > (In reply to Michael Stahl (allotropia) from comment #2) > > "Transfer-Encoding: chunked" and libcurl cannot handle it. > > I don't know how this may be related, but it seems that at least something > is supported in libcurl: > > https://pragmaticjoe.gitlab.io/posts/2016-09-04-http-chunked-encoding-using- > c-and-libcurl/ > > which deals with more problematic case of not having all the data in > advance, but also mentions that when everything is at hand, "you just need > to add the header “Transfer-Encoding: chunked” to the request, and curl will > take care of everything after that". The ucb code contains several comments about Sharepoint and Nextcloud problems with chunked encoding: // note: Sharepoint cannot handle "Transfer-Encoding: chunked" // note: Nextcloud 20 cannot handle "Transfer-Encoding: chunked" etc. Likely it's important, that a newer command line curl (e.g. on Ubuntu 22) has got a similar problem with Vibe WebDAV server, i.e. it was possible to overwrite *an existing remote file* only with --http1.0: curl -u user:passwd --http1.0 -T local_modified_copy weblink But an older curl (e.g. on Ubuntu 20.04: curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3 Release-Date: 2020-01-08 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets) works with its default options. So switching on HTTP 1.0 as the common ground seems to be more viable solution for me, than applying some low level settings, which would need more careful testing likely with the different WebDAV servers.
> So switching on HTTP 1.0 as the common ground seems to be more viable solution for me, than applying some low level settings, which would need more careful testing likely with the different WebDAV servers. Note: HTTP 1.0 is only the fallback when CURLE_UNSUPPORTED_PROTOCOL error occurs.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/0d0f4411934dead0765930693072fe9582f50be9 tdf#152493 ucb WebDAV: fix upload using HTTP 1.0 fallback It will be available in 7.5.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/7dc3d1b88f368d40552531c1f9999ed67826fb9d tdf#152493 ucb WebDAV: fix upload using HTTP 1.0 fallback It will be available in 7.4.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.