0

I am using CalDAV server.

When I send following request:

curl --request PROPFIND  --user admin:admin --header "depth:0" --header "Content-Type: text/xml"  --data "<D:propfind xmlns:D='DAV:'><D:prop><D:allprop/></D:prop></D:propfind>" http://example/calendars/users/admin/calendar/

I get response as follows:

<?xml version='1.0' encoding='UTF-8'?>
<multistatus xmlns='DAV:'>
  <response>
    <href>/calendars/users/admin/calendar/</href>
    <propstat>
      <prop>
        <allprop/>
      </prop>
      <status>HTTP/1.1 404 Not Found</status>
    </propstat>
  </response>

If I understand correctly, CalDAV does support allprop as I looked at tutorials and examples.

If I change allprop to displayname or acl, it does work then.

Is allprop not supported or what is the new equivalent of allprop?

Or is my request bad?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
GJain
  • 5,025
  • 6
  • 48
  • 82

1 Answers1

4

Yes, your request is wrong.

The request, as you have it, is asking for a property allprop.

What you want to do is:

<D:propfind xmlns:D='DAV:'><D:allprop/></D:propfind>

Refer to the RFC 2518 section 8.1.2 Example - Using allprop to Retrieve All Properties

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • 2
    It is even easier: A PROPFIND with an empty body is the same like an query. Content-Length:0 is sufficient. ("A client may choose not to submit a request body. An empty PROPFIND request body MUST be treated as if it were an 'allprop' request.") – hnh Nov 11 '14 at 13:27