mirror of
https://github.com/moparisthebest/davmail
synced 2024-08-13 16:53:51 -04:00
Caldav: replace etag by resourcetag in getCalendarEtag
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@499 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
c0a7f59384
commit
52dd976637
@ -83,6 +83,11 @@ public class ExchangeSession {
|
||||
CONTENT_TAG.add(DavPropertyName.create("contenttag", Namespace.getNamespace("http://schemas.microsoft.com/repl/")));
|
||||
}
|
||||
|
||||
protected static final DavPropertyNameSet RESOURCE_TAG = new DavPropertyNameSet();
|
||||
|
||||
static {
|
||||
RESOURCE_TAG.add(DavPropertyName.create("resourcetag", Namespace.getNamespace("http://schemas.microsoft.com/repl/")));
|
||||
}
|
||||
|
||||
public static final HashMap<String, String> PRIORITIES = new HashMap<String, String>();
|
||||
|
||||
@ -1644,12 +1649,12 @@ public class ExchangeSession {
|
||||
public String getCalendarEtag() throws IOException {
|
||||
String etag;
|
||||
MultiStatusResponse[] responses = DavGatewayHttpClientFacade.executePropFindMethod(
|
||||
httpClient, URIUtil.encodePath(calendarUrl), 0, EVENT_REQUEST_PROPERTIES);
|
||||
httpClient, URIUtil.encodePath(calendarUrl), 0, RESOURCE_TAG);
|
||||
if (responses.length == 0) {
|
||||
throw new IOException("Unable to get calendar object");
|
||||
}
|
||||
MultiStatusResponse calendarResponse = responses[0];
|
||||
etag = getPropertyIfExists(calendarResponse.getProperties(HttpStatus.SC_OK), "getetag", Namespace.getNamespace("DAV:"));
|
||||
etag = getPropertyIfExists(calendarResponse.getProperties(HttpStatus.SC_OK), "resourcetag", Namespace.getNamespace("http://schemas.microsoft.com/repl/"));
|
||||
if (etag == null) {
|
||||
throw new IOException("Unable to get calendar etag");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user