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:
parent
92dabe10f2
commit
0a32a5ba9e
@ -1544,20 +1544,19 @@ 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);
|
||||||
|
|
||||||
|
if (status == HttpStatus.SC_MULTI_STATUS) {
|
||||||
|
Item newItem = getItem(folderPath, itemName);
|
||||||
|
itemResult.status = propPatchMethod.getResponseStatusCode();
|
||||||
|
itemResult.etag = newItem.etag;
|
||||||
|
} else {
|
||||||
|
itemResult.status = status;
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
propPatchMethod.releaseConnection();
|
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 {
|
} else {
|
||||||
String encodedHref = URIUtil.encodePath(getHref());
|
String encodedHref = URIUtil.encodePath(getHref());
|
||||||
byte[] mimeContent = createMimeContent();
|
byte[] mimeContent = createMimeContent();
|
||||||
|
Loading…
Reference in New Issue
Block a user