2013-03-22 83 views
0

我正在将sabredav集成到我的web应用程序中,我的应用程序之间的连接 - > sabredab似乎很好。使用浏览器,我可以访问所有需要的电子名片。sabredav carddav不工作在ios上,在android上进行barily工作

在Android上,当我使用url

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

其同步完美

但是在iOS(6),它会在example.org/.well-known/carddav

我已经重定向到example.org/sabredavcontroller/index/,但它没有做任何事情,并尝试其他网址也不工作,并出错。

这是从当IOS尝试建立一个帐户的CardDAV的ACCESSLOG:

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 - [email protected] [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" 

(澄清:第一行是通过重定向找出sabredav的根:301 的二线是到根目录的请求,但它需要一个用户名/ PW 第三相同第二但认证 ,然后将其在此URL放弃并尝试其他选项 )

结果从第三行是,使用curl和这个命令:

curl --header "Content-Type: text/xml" -u "[email protected]: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> 

任何人都可以给我什么可能会错误的提示?

诗篇。我正在使用SabreDAV http://sabre.io/我无法创建新标签,但因信誉问题

+1

一个常见的错误是不加载ACL插件,这是必需的。另外,你有什么基地网址? – Evert 2013-03-23 18:01:43

+0

你是完全正确的,它需要一些摆弄正确的群体,但不是它的作品像一个魅力,如果你将它添加为我接受它的答案;) – Xeli 2013-03-27 08:31:49

回答

1

您缺少ACL插件。 CardDAV需要它!

相关问题