Caldav: fix noneMatch handling over WebDav

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1742 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-07-20 13:47:37 +00:00
parent 92dabe10f2
commit 0a32a5ba9e
1 changed files with 9 additions and 10 deletions

View File

@ -1544,20 +1544,19 @@ public class DavExchangeSession extends ExchangeSession {
propPatchMethod.setRequestHeader("If-None-Match", noneMatch);
}
try {
httpClient.executeMethod(propPatchMethod);
int status = httpClient.executeMethod(propPatchMethod);
if (status == HttpStatus.SC_MULTI_STATUS) {
Item newItem = getItem(folderPath, itemName);
itemResult.status = propPatchMethod.getResponseStatusCode();
itemResult.etag = newItem.etag;
} else {
itemResult.status = status;
}
} finally {
propPatchMethod.releaseConnection();
}
int status = DavGatewayHttpClientFacade.executeHttpMethod(httpClient, propPatchMethod);
if (status == HttpStatus.SC_MULTI_STATUS) {
Item newItem = getItem(folderPath, itemName);
itemResult.status = propPatchMethod.getResponseStatusCode();
itemResult.etag = newItem.etag;
} else {
itemResult.status = status;
}
} else {
String encodedHref = URIUtil.encodePath(getHref());
byte[] mimeContent = createMimeContent();