diff options
author | cos <cos> | 2017-01-20 13:23:33 +0100 |
---|---|---|
committer | cos <cos> | 2017-01-20 13:23:33 +0100 |
commit | 70c1b9b8c288f87100a333be62f682fb8abf69fb (patch) | |
tree | 2f995518eaa74a08eb59d403c9d624129b04ccb6 | |
parent | 3375fddb4e594badf7a7ab0cc722dc33a3af1131 (diff) | |
download | calcurse-wip/fugly_sogo_sync.zip |
Hack up caldav to kind of semi-work with SOGo.wip/fugly_sogo_sync
This is an ugly work around that makes an initial one time synchronization
happen, it is not an actually working fix.
Implementing a proper fix would require reading up on WebDAV and understanding
the protocol. That means reading at least section 7 of rfc479.
https://tools.ietf.org/html/rfc4791#section-7
All this code does is demonstrating that making calcurse-caldav use the same
xml payload as a Mozilla Lightning causes the REPORT command to actually do
something slightly useful.
-rwxr-xr-x | contrib/caldav/calcurse-caldav.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py index 5c028bf..3a3a4d1 100755 --- a/contrib/caldav/calcurse-caldav.py +++ b/contrib/caldav/calcurse-caldav.py @@ -147,11 +147,12 @@ def get_etags(conn, hrefs=[]): body += '</C:calendar-multiget>' else: body = ('<?xml version="1.0" encoding="utf-8" ?>' - '<C:calendar-query xmlns:D="DAV:" ' - ' xmlns:C="urn:ietf:params:xml:ns:caldav">' - '<D:prop><D:getetag /></D:prop>' - '<C:filter><C:comp-filter name="VCALENDAR" /></C:filter>' - '</C:calendar-query>') + '<sync-collection xmlns="DAV:"><sync-token/><sync-level>1</sync-level><prop><getcontenttype/><getetag/></prop></sync-collection>') +# '<C:calendar-query xmlns:D="DAV:" ' +# ' xmlns:C="urn:ietf:params:xml:ns:caldav">' +# '<D:prop><D:getetag /></D:prop>' +# '<C:filter><C:comp-filter name="VCALENDAR" /></C:filter>' +# '</C:calendar-query>') headers, body = remote_query(conn, "REPORT", path, {}, body) if not headers: return {} |