From 687788e4d30bf36dd93c39d72335f331f49f0745 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 4 Jan 2021 14:22:19 +0100 Subject: Fix Webdav storage PROPFIND request Remove additional "a:prop" in PROPFIND request to match RFC 4918 section 9.1.3. Added Content-Type header as the body is not a true multipart POST. Signed-off-by: Vincent Petry --- src/storage/plugins/CurlStorage.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index ccfb0bf12..ad6f71fce 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -262,18 +262,19 @@ public: request.SetOption(CURLOPT_MAXREDIRS, 1L); request_headers.Append(StringFormat<40>("depth: %u", depth)); + request_headers.Append("content-type: text/xml"); request.SetOption(CURLOPT_HTTPHEADER, request_headers.Get()); request.SetOption(CURLOPT_POSTFIELDS, "\n" "" - "" - "" - "" + "" + "" + "" + "" + "" ""); - - // TODO: send request body } using BlockingHttpRequest::GetEasy; -- cgit v1.2.3