1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 03:02:22 -05:00

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
This commit is contained in:
mguessan 2011-06-28 22:40:00 +00:00
parent 913a4d76e8
commit f5a4ed2935
2 changed files with 3 additions and 4 deletions

View File

@ -259,8 +259,7 @@ public class CaldavConnection extends AbstractConnection {
reportItems(request); reportItems(request);
// event requests // event requests
} else if (request.isPut()) { } else if (request.isPut()) {
// remove quotes on etag for Evolution String etag = request.getHeader("if-match");
String etag = StringUtil.removeQuotes(request.getHeader("if-match"));
String noneMatch = request.getHeader("if-none-match"); String noneMatch = request.getHeader("if-none-match");
ExchangeSession.ItemResult itemResult = session.createOrUpdateItem(request.getFolderPath(), lastPath, request.getBody(), etag, noneMatch); ExchangeSession.ItemResult itemResult = session.createOrUpdateItem(request.getFolderPath(), lastPath, request.getBody(), etag, noneMatch);
sendHttpResponse(itemResult.status, buildEtagHeader(itemResult.etag), null, "", true); sendHttpResponse(itemResult.status, buildEtagHeader(itemResult.etag), null, "", true);

View File

@ -1580,12 +1580,12 @@ public class EwsExchangeSession extends ExchangeSession {
@Override @Override
protected ItemResult internalCreateOrUpdateContact(String folderPath, String itemName, Map<String, String> properties, String etag, String noneMatch) throws IOException { protected ItemResult internalCreateOrUpdateContact(String folderPath, String itemName, Map<String, String> 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 @Override
protected ItemResult internalCreateOrUpdateEvent(String folderPath, String itemName, String contentClass, String icsBody, String etag, String noneMatch) throws IOException { 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 @Override