ucb: webdav-curl: don't use chunked encoding for PROPFIND
commitac787764de3806b75607634a5c5856f58ddce881
authorMichael Stahl <michael.stahl@allotropia.de>
Thu, 25 Nov 2021 16:16:36 +0000 (25 17:16 +0100)
committerMichael Stahl <michael.stahl@allotropia.de>
Fri, 26 Nov 2021 17:02:06 +0000 (26 18:02 +0100)
tree5c3ae560be9f0d2b4582a1d934912fefdff3513d
parent2c50375c8dc97e1c83e0bd952ed83baeab9e7190
ucb: webdav-curl: don't use chunked encoding for PROPFIND

Sharepoint 16 responds to PROPFIND with "Transfer-Encoding: chunked"
with "HTTP/1.1 200 OK" and this body:

  <HTML><DIV dir="ltr"><H2>Microsoft SharePoint Foundation Error.</H2>\n\n<P>\n<B>User:</B> please report details to this Web site's Webmaster.\n<P>\n\n<P>\n<B>Webmaster:</B> please see the server's application event log for more details.\n</P></DIV>

Understandably, WebDAVResponseParser barfs on this:

ucb/source/ucp/webdav-curl/webdavresponseparser.cxx:405: Parser destructed with existing content (!)
ucb/source/ucp/webdav-curl/webdavresponseparser.cxx:942: WebDAV Parse error (!)

Apparently setting Content-Length works better.

Change-Id: If3eae8c2f8b9f1e1bb4ed4fc67a79a682d7d0050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125825
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 8bb183f133202ebb687e0b56cc5a2938354506f7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125844
ucb/source/ucp/webdav-curl/CurlSession.cxx