[kronolith] horde/rpc.php/principals/user/ empty since some releases

Jens Wahnes wahnes at uni-koeln.de
Wed Apr 6 08:30:57 UTC 2016


Christoph Haas wrote:

>>> Investigations via web-browser revealed that the
>>> horde/rpc.php/principals/user/ was empty.
>>> Thus the directories horde/rpc.php/calendars/user etc. are filled
>>> with the correct data.
>>> user here is a placeholder for the real username.

>> There is nothing wrong with that. Those directories don't hold any
>> objects, just metadata.

> but, when I try to setup a new DAV-account with the principals-method on
> my smartphones (Android with DAVdroid), I get on different smartphones
> for both horde-installations mentioned above, an error that says there
> are no resources available.

A proper CalDAV client should be able to pick up the resources available 
to this user through that URL, regardless of the fact that there is 
nothing shown when accessing that very URL through a browser (sending a 
regular GET request).  So it seems that something else is wrong with 
your Horde installation if it doesn't work that way for you.  Have you 
double-checked the URL used on the mobile device to make sure there is 
no copy/paste error there?

If you do want to debug this through a browser, you'll have to use a 
browser that enables you to send proper requests for that purpose, e.g. 
PROPFIND (maybe OPTIONS as well).  One way to do that is to use Firefox 
with the RESTClient add-on.  This allows you to send appropriate XML 
requests to have the Horde server list the calendars available.  A nice 
example of how to do that is given on the page 
<http://sabre.io/dav/building-a-caldav-client/> in section "Discovery".

So in your case, you would first have to send a PROPFIND request.  Make 
sure to send it to the full URL (including protocol type) that ends with 
horde/rpc.php/principals/user/
The request body should look like this:

<d:propfind xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
   <d:prop>
      <c:calendar-home-set />
   </d:prop>
</d:propfind>

This should give you a referral to the horde/rpc.php/principals/user/ 
URL, i.e. the server's XML respone should have this as the "href" value 
in the (innermost) calendar-home-set tag.

The second step would then be to list all calendars available for that 
user.  To do so, you would issue onother PROPFIND request, but this time 
with the new URL that ends in horde/rpc.php/principals/user/
This time, the request body would have to be:

<d:propfind xmlns:d="DAV:" xmlns:cs="http://calendarserver.org/ns/" 
xmlns:c="urn:ietf:params:xml:ns:caldav">
   <d:prop>
      <d:resourcetype />
      <d:displayname />
      <c:supported-calendar-component-set />
   </d:prop>
</d:propfind>

The server's reply should now contain an XML-based list of all calendars 
and task lists this user has got access to.  If this works in the 
browser, it should work in a CalDAV client as well.  If it doesn't work 
in the browser, there is likely something else wrong.  But beware to 
jump to conclusions, if don't have experience with sending such 
requests, it might be that something went wrong there and not on the 
server side.


Jens


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4986 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/kronolith/attachments/20160406/db9dd1e2/attachment-0001.bin>


More information about the kronolith mailing list