diff --git a/src/java/davmail/caldav/CaldavConnection.java b/src/java/davmail/caldav/CaldavConnection.java index ccdcfd10..ca181097 100644 --- a/src/java/davmail/caldav/CaldavConnection.java +++ b/src/java/davmail/caldav/CaldavConnection.java @@ -259,8 +259,7 @@ public class CaldavConnection extends AbstractConnection { reportItems(request); // event requests } else if (request.isPut()) { - // remove quotes on etag for Evolution - String etag = StringUtil.removeQuotes(request.getHeader("if-match")); + String etag = request.getHeader("if-match"); String noneMatch = request.getHeader("if-none-match"); ExchangeSession.ItemResult itemResult = session.createOrUpdateItem(request.getFolderPath(), lastPath, request.getBody(), etag, noneMatch); sendHttpResponse(itemResult.status, buildEtagHeader(itemResult.etag), null, "", true); diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index 2b61e001..e881bae1 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -1580,12 +1580,12 @@ public class EwsExchangeSession extends ExchangeSession { @Override protected ItemResult internalCreateOrUpdateContact(String folderPath, String itemName, Map properties, String etag, String noneMatch) throws IOException { - return new Contact(folderPath, itemName, properties, etag, noneMatch).createOrUpdate(); + return new Contact(folderPath, itemName, properties, StringUtil.removeQuotes(etag), noneMatch).createOrUpdate(); } @Override protected ItemResult internalCreateOrUpdateEvent(String folderPath, String itemName, String contentClass, String icsBody, String etag, String noneMatch) throws IOException { - return new Event(folderPath, itemName, contentClass, icsBody, etag, noneMatch).createOrUpdate(); + return new Event(folderPath, itemName, contentClass, icsBody, StringUtil.removeQuotes(etag), noneMatch).createOrUpdate(); } @Override