From f5a4ed293584fcc4406b35a43f804d6b7307570d Mon Sep 17 00:00:00 2001 From: mguessan Date: Tue, 28 Jun 2011 22:40:00 +0000 Subject: [PATCH] Caldav: move remove quotes for Evolution to EWS mode only git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1725 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/caldav/CaldavConnection.java | 3 +-- src/java/davmail/exchange/ews/EwsExchangeSession.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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