mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 11:42:23 -05:00
Caldav: fix regression after ActiveSync patch, PROPPATCH on contentClass removes all custom ICS properties
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@767 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
d99f8b2866
commit
db3bd5914b
@ -2359,6 +2359,19 @@ public class ExchangeSession {
|
|||||||
if (patchStatus != HttpStatus.SC_MULTI_STATUS) {
|
if (patchStatus != HttpStatus.SC_MULTI_STATUS) {
|
||||||
LOGGER.warn("Unable to patch event to trigger activeSync push");
|
LOGGER.warn("Unable to patch event to trigger activeSync push");
|
||||||
} else {
|
} else {
|
||||||
|
// Yet another patch: restore message custom body, all custom lines are removed by PROPPATCH
|
||||||
|
PutMethod restorePutMethod = new PutMethod(messageUrl);
|
||||||
|
restorePutMethod.setRequestHeader("Translate", "f");
|
||||||
|
restorePutMethod.setRequestHeader("Overwrite", "f");
|
||||||
|
restorePutMethod.setRequestEntity(new ByteArrayRequestEntity(baos.toByteArray(), "message/rfc822"));
|
||||||
|
try {
|
||||||
|
status = httpClient.executeMethod(restorePutMethod);
|
||||||
|
if (status == HttpURLConnection.HTTP_OK) {
|
||||||
|
LOGGER.warn("Unable to create or update message " + status + ' ' + restorePutMethod.getStatusLine());
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
putmethod.releaseConnection();
|
||||||
|
}
|
||||||
// Need to get event again to get updated etag
|
// Need to get event again to get updated etag
|
||||||
Event event = getEvent(messageUrl);
|
Event event = getEvent(messageUrl);
|
||||||
if (event.getEtag() != null) {
|
if (event.getEtag() != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user