Вопрос

I'm integrating sabredav into my webapplication, the connection between my app -> sabredab seems to be fine. Using the browser I can get to all the vcards needed.

On Android when I use the url

example.org/sabredavcontroller/index/addressbooks/principalID/addressbookID

it sync perfectly

However on ios (6) it goes at example.org/.well-known/carddav

Which i've redirected to example.org/sabredavcontroller/index/ but then it does nothing with it and tries other urls which don't work either and errors out.

This is the accesslog from when ios tries to set up an account to carddav:

projectnexys.com:80 192.168.125.24 - - [22/Mar/2013:10:41:58 +0100] "PROPFIND /.well-known/carddav HTTP/1.1" 302 574 "-" "iOS/6.1.2 (10B146) Preferences/1.0"
projectnexys.com:80 192.168.125.24 - - [22/Mar/2013:10:41:59 +0100] "PROPFIND /sabredavcontroller/index/ HTTP/1.1" 401 985 "-" "iOS/6.1.2  (10B146) Preferences/1.0"
projectnexys.com:80 192.168.125.24 - member2@bla.bla [22/Mar/2013:10:41:59 +0100] "PROPFIND /sabredavcontroller/index/ HTTP/1.1" 207 1423 "-" "iOS/6.1.2 (10B146) Preferences/1.0"
projectnexys.com:80 192.168.125.24 - - [22/Mar/2013:10:42:00 +0100] "PROPFIND / HTTP/1.1" 302 818 "-" "iOS/6.1.2 (10B146) Preferences/1.0"
projectnexys.com:80 192.168.125.24 - - [22/Mar/2013:10:42:01 +0100] "PROPFIND /account HTTP/1.1" 200 2107 "-" "iOS/6.1.2 (10B146) Preferences/1.0"
projectnexys.com:80 192.168.125.24 - - [22/Mar/2013:10:42:01 +0100] "PROPFIND /principals/ HTTP/1.1" 404 890 "-" "iOS/6.1.2 (10B146) Preferences/1.0"

(To clarify: the first line is to find out the root of sabredav via redirect: 301 the secondline is a request to the root but it needs an username/pw the third is the same as second but with authentication and then it gives up on this url and tries other options )

The result from the third line is, using curl with this command:

curl --header "Content-Type: text/xml" -u "member2@bla.bla:bla" --request PROPFIND  projectnexys.com/sabredavcontroller/index/ | xmllint --format -

-

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:card="urn:ietf:params:xml:ns:carddav">
  <d:response>
    <d:href>/sabredavcontroller/index/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Fri, 22 Mar 2013 09:36:52 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:response>
    <d:href>/sabredavcontroller/index/principals/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Fri, 22 Mar 2013 09:36:52 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:response>
    <d:href>/sabredavcontroller/index/addressbooks/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Fri, 22 Mar 2013 09:36:52 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>

Could anyone give me tips on what might be going wrong?

Ps. I am using SabreDAV http://sabre.io/ I can't create a new tag yet tho 'cause of reputation

Это было полезно?

Решение

You are missing the ACL plugin. CardDAV requires it!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top