은 ... thereDavical 동기화 - 토큰 I CalDAV를 동기화 구현에 대한 몇 가지 좋은 문서를 발견했다</p> <p>웹 요청
의 웹 사이트에 따르면, DaviCal는 rfc6578입니다 0.9.8 이후로는 (here 참조). 다음과 같이
그래서 저는 먼저 동기화 토큰을 얻기 위해 내 요청을 보내
PROPFIND http://my_cal_srv/user/calendar_path HTTP/1.1
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<d:propfind xmlns:d='DAV:'>
<d:prop>
<d:displayname />
<d:sync-token />
</d:prop>
</d:propfind>
이 예상대로 데이터를 반환
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>/caldav.php/user/calendar_path/</href>
<propstat>
<prop>
<displayname>My Calendar</displayname>
<sync-token>data:,9</sync-token>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
이 지금까지 너무 좋아, 내가,이 토큰의 한
을 " 데이터 :, 9 ". 그래서, 8시 이후에 변경을 시도해 봅시다. 어떤 이벤트를 추가하기 전에 서버에 질의를했을 때의 토큰입니다.
REPORT http://my_cal_srv/user/calendar_path HTTP/1.1
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<d:sync-collection xmlns:d="DAV:">
<d:sync-token>8</d:sync-token>
<d:sync-level>1</d:sync-level>
<d:prop>
<d:getetag/>
</d:prop>
</d:sync-collection>
대답은 :
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>/caldav.php/user/cal_path/86166f9c-3e2e-4242-9a28-0f3bfb1dd67a-caldavsyncadapter.ics</href>
<status>HTTP/1.1 404 Not Found</status>
</response>
<response>
<href>/caldav.php/user/cal_path/cb354fab-b41d-49ad-8a4f-8d68c9090ea0.ics</href>
<propstat>
<prop>
<getetag>"334892703f4151024e9232eab9b515a7"</getetag>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<sync-token>data:,10</sync-token>
</multistatus>
:
이
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>/caldav.php/user/path/86166f9c-3e2e-4242-9a28-0f3bfb1dd67a-caldavsyncadapter.ics</href>
<propstat>
<prop>
<getetag>"5ed2101b0c867e490dbd71d40c7071bb"</getetag>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user/path/cb354fab-b41d-49ad-8a4f-8d68c9090ea0.ics</href>
<propstat>
<prop>
<getetag>"334892703f4151024e9232eab9b515a7"</getetag>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<sync-token>data:,9</sync-token>
</multistatus>
항목을 삭제 한 후, 나는 그 결과 다음과 같은 취득 (내가 동기화 토큰 (10) 얻을, 여전히 사용하여 비교 8 토큰)
그래서 나는이 결과를 해석하는 법을 알지 못하기 때문에 여기서 약간 혼란 스럽습니다 ...
아무도 말할 수 없습니다. 여기에서 동기화 정보를 추출하는 방법을 알고 계시나요? ICS 명명이 불분명하기 때문에 변경 유형을 알아내는 것은 조금 어렵습니다 ...
도와 주셔서 미리 감사드립니다 ... 그리고 즐거운 X-Mas! 감사합니다. N.
모두 잘 작동합니다. ** DaviCal **의 경우 토큰이 만료되면 서버는 자동으로 ** ALL ** 이벤트를 요청에 반환합니다. 임의의 키로 요청을 테스트했지만 오류 응답을 얻지는 못했지만 콘텐츠를 보면 항상 서버에있는 모든 이벤트를 반환합니다. – neggenbe
DaviCal의 주요 버그. 토큰이 만료되었을 때 삭제 된 리소스를 클라이언트가 어떻게 파악할 수 있습니까? 클라이언트에게는 토큰이 정상적으로 보이고 결과가 변경 세트로 처리됩니다 (응답에 모든 것이 포함된다는 표시가 없음). – hnh
좋은 지적 - 이에 대처하는 방법에 대한 제안? – neggenbe