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 <PVince81@yahoo.fr>
This commit is contained in:
parent
5348f8c9c8
commit
687788e4d3
@ -262,18 +262,19 @@ public:
|
|||||||
request.SetOption(CURLOPT_MAXREDIRS, 1L);
|
request.SetOption(CURLOPT_MAXREDIRS, 1L);
|
||||||
|
|
||||||
request_headers.Append(StringFormat<40>("depth: %u", depth));
|
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_HTTPHEADER, request_headers.Get());
|
||||||
|
|
||||||
request.SetOption(CURLOPT_POSTFIELDS,
|
request.SetOption(CURLOPT_POSTFIELDS,
|
||||||
"<?xml version=\"1.0\"?>\n"
|
"<?xml version=\"1.0\"?>\n"
|
||||||
"<a:propfind xmlns:a=\"DAV:\">"
|
"<a:propfind xmlns:a=\"DAV:\">"
|
||||||
"<a:prop><a:resourcetype/></a:prop>"
|
"<a:prop>"
|
||||||
"<a:prop><a:getcontenttype/></a:prop>"
|
"<a:resourcetype/>"
|
||||||
"<a:prop><a:getcontentlength/></a:prop>"
|
"<a:getcontenttype/>"
|
||||||
|
"<a:getcontentlength/>"
|
||||||
|
"</a:prop>"
|
||||||
"</a:propfind>");
|
"</a:propfind>");
|
||||||
|
|
||||||
// TODO: send request body
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using BlockingHttpRequest::GetEasy;
|
using BlockingHttpRequest::GetEasy;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user