Just a quick note to say that as far as I understand, this question is now 
being handled off-list via fruux.

On Sunday, November 9, 2014 2:54:01 PM UTC-5, dredshaw wrote:
>
> Hi everybody
>
> I have an issue with the bootstrap process connecting to SabreDAV 1.8.5 
> from iOS 8.1 and OSX 10.10 (Apple Address Book / Contacts apps).
>
> I believe the server.php is relatively standard. I have custom backend 
> plugins for DAVACL, CardDAV, CalDAV and Auth (based on basic http auth). 
> The actual server is inside a CodeIgniter controller but is mapped to the 
> root of the host.
>
> I've used the HTTP plugin and everything works perfectly. I have accounts 
> already set up which work perfectly using CardDAV and CalDAV.
>
> I've noticed some odd things through debugging.
>
> When the client issues the sequence of PROPFIND requests 
> the getPrincipalsByPrefix method is never called.
>
> The getPrincipalByPath method is called with a URI of "principals/users" 
> which doesn't identify the required user. Because my auth plugin is based 
> on the basic auth plugin I tried using the authorised user email to return 
> the "principals/<email>" as the URI in response to getPrincipalsByPath but 
> then the system calls getPrincipalsByPath with principals/<email>/<email> 
> as the parameter. I suspect I may be returning something incorrectly here.
>
> The request that I think is wrong is this one:
>
> <A:propfind xmlns:A="DAV:"> 
> <A:prop> 
> <A:current-user-principal /> 
> <A:principal-URL /> 
> <A:resourcetype /> 
> </A:prop> 
> </A:propfind>
>
> Which always returns:
>
> <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"; 
> xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="
> http://calendarserver.org/ns/"; 
> xmlns:card="urn:ietf:params:xml:ns:carddav">
> <d:response>
> <d:href>/principals/</d:href>
> <d:propstat>
> <d:prop>
> <d:getlastmodified>Sun, 09 Nov 2014 19:39:46 GMT</d:getlastmodified>
> <d:resourcetype>
> <d:collection />
> </d:resourcetype>
> </d:prop>
> <d:status>HTTP/1.1 200 OK</d:status>
> </d:propstat>
> </d:response>
> </d:multistatus>
>
> The "server" code is as follows:
>
>          // SabreDAV takes care of the output
>         $this->view = false;
>
>         date_default_timezone_set('Europe/London');
>
>         // Make sure this setting is turned on and reflect the root url 
> for your WebDAV server.
>         // This can be for example the root / or a complete path to your 
> server script
>         $baseUri = '/';
>
>         // Backends
>         $authBackend      = new Sabre\DAV\Auth\Backend\MacCRM($this->dav);
>         $principalBackend = new 
> Sabre\DAVACL\PrincipalBackend\MacCRM($this->dav);
>         $caldavBackend   = new 
> Sabre\CalDAV\Backend\MacCRM($this->vcalendar);
>         $carddavBackend   = new Sabre\CardDAV\Backend\MacCRM($this->vcard);
>
>         $nodes = array(
>             new \Sabre\DAVACL\PrincipalCollection($principalBackend),
>             // /principals
>             new \Sabre\CalDAV\Principal\Collection($principalBackend),
>             // /calendars
>             new \Sabre\CalDAV\CalendarRootNode($principalBackend, 
> $caldavBackend),
>             // /addressbook
>             new \Sabre\CardDAV\AddressBookRoot($principalBackend, 
> $carddavBackend),
>         );
>
>         // The object tree needs in turn to be passed to the server class
>         $server = new Sabre\DAV\Server($nodes);
>         $server->setBaseUri($baseUri);
>
>         // Plugins
>         $server->addPlugin(new 
> Sabre\DAV\Auth\Plugin($authBackend,APP_NAME)); // APP_NAME is the 
> authentication Realm
>         $server->addPlugin(new Sabre\DAV\Browser\Plugin());
>         $server->addPlugin(new Sabre\DAV\Exception\SyncBuddy());
>         $server->addPlugin(new Sabre\CalDAV\Plugin());
>         $server->addPlugin(new Sabre\CardDAV\Plugin());
>         //$server->addPlugin(new Sabre\CardDAV\Plugin());
>         $server->addPlugin(new Sabre\DAVACL\Plugin());
>
>         // And off we go!
>         try {
>             $server->exec();
>         }
>         catch (Exception $e) {
>             log_message('ERROR', 'DAV Server Error: ' . $e->getMessage());
>                  }
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SabreDAV Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sabredav-discuss/4f0491b2-f700-486f-9fe7-ccdfbca9a736%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to