geier / pycarddav

DEPRECATED - use vdirsyncer & khard -- easy to use CLI CardDAV client
http://lostpackets.de/pycarddav
MIT License
98 stars 35 forks source link

SOGo compatibility #55

Closed ccb23 closed 11 years ago

ccb23 commented 11 years ago

I just checked if pycarddav is working with SOGo-Groupware (http://www.sogo.nu). It is working quite well. But I had to remove the following constraints check in carddav.py:

if response.headers['DAV'].count('addressbook') == 0: raise Exception("URL is not a CardDAV resource")

geier commented 11 years ago

Thanks for the heads up. Could you perhaps send me the complete headers of a SOGo response? Thx

ccb23 commented 11 years ago

sure, I'll send it to you tonight. Maybe I can also setup a test account for you on my sogo-box. Cheers Christoph

ccb23 commented 11 years ago

'print response.headers' gives me:

{'content-length': '8789', 'content-encoding': 'gzip', 'ms-author-via': 'DAV', 'server': 'SOPE 4.9.37/WebDAV', 'x-dav-error': '200 No error', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Mon, 22 Apr 2013 16:58:33 GMT', 'content-type': 'text/xml; charset="utf-8"'}

geier commented 11 years ago

thx. Turns out, it should do an 'OPTIONS' request for testing if it has CardDAV support. I hope to fix that soon.

geier commented 11 years ago

could you please test pycarddav branch 4.2-dev against SOGo?

geier commented 11 years ago

@ccb23 did you find the time to test the latest version against SOGo?

ccb23 commented 11 years ago

Sorry, for my late reply. The issue is still there:

File "pycarddav/carddav.py", line 250, in _get_xml_props if response.headers['DAV'].count('addressbook') == 0: AttributeError: 'NoneType' object has no attribute 'count'

I had to remove your check in line 250, to get it working.

geier commented 11 years ago

looks like I forgot to take lines 250 and 251 out in commit 686078746c4c8b3324879ae5c0f6fdccdc0fb9e9 as long as line 102 and 103 can stay in, all should be good.

geier commented 11 years ago

could you confirm (again) that it is working now? thanks!

ccb23 commented 11 years ago

yes, now it's working!

geier commented 11 years ago

great, I'll close this bug then