1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 11:42:23 -05:00

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

View File

@ -1544,12 +1544,8 @@ public class DavExchangeSession extends ExchangeSession {
propPatchMethod.setRequestHeader("If-None-Match", noneMatch); propPatchMethod.setRequestHeader("If-None-Match", noneMatch);
} }
try { try {
httpClient.executeMethod(propPatchMethod); int status = httpClient.executeMethod(propPatchMethod);
} finally {
propPatchMethod.releaseConnection();
}
int status = DavGatewayHttpClientFacade.executeHttpMethod(httpClient, propPatchMethod);
if (status == HttpStatus.SC_MULTI_STATUS) { if (status == HttpStatus.SC_MULTI_STATUS) {
Item newItem = getItem(folderPath, itemName); Item newItem = getItem(folderPath, itemName);
itemResult.status = propPatchMethod.getResponseStatusCode(); itemResult.status = propPatchMethod.getResponseStatusCode();
@ -1557,6 +1553,9 @@ public class DavExchangeSession extends ExchangeSession {
} else { } else {
itemResult.status = status; itemResult.status = status;
} }
} finally {
propPatchMethod.releaseConnection();
}
} else { } else {
String encodedHref = URIUtil.encodePath(getHref()); String encodedHref = URIUtil.encodePath(getHref());