mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Caldav: Improved message on update and fixed Etag response header
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@424 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4e467ee53f
commit
8ab20013a7
@ -240,8 +240,8 @@ public class CaldavConnection extends AbstractConnection {
|
||||
ExchangeSession.EventResult eventResult = session.createOrUpdateEvent(paths[4], body, etag, noneMatch);
|
||||
if (eventResult.etag != null) {
|
||||
HashMap<String, String> responseHeaders = new HashMap<String, String>();
|
||||
responseHeaders.put("GetETag", eventResult.etag);
|
||||
sendHttpResponse(eventResult.status, responseHeaders, "text/html", "", true);
|
||||
responseHeaders.put("ETag", eventResult.etag);
|
||||
sendHttpResponse(eventResult.status, responseHeaders, null, "", true);
|
||||
} else {
|
||||
sendHttpResponse(eventResult.status, true);
|
||||
}
|
||||
|
@ -1550,7 +1550,11 @@ public class ExchangeSession {
|
||||
if (status == 0) {
|
||||
status = wdr.retrieveSessionInstance().executeMethod(putmethod);
|
||||
if (status == HttpURLConnection.HTTP_OK) {
|
||||
LOGGER.warn("Overwritten event " + messageUrl);
|
||||
if (etag != null) {
|
||||
LOGGER.debug("Updated event " + messageUrl);
|
||||
} else {
|
||||
LOGGER.warn("Overwritten event " + messageUrl);
|
||||
}
|
||||
} else if (status != HttpURLConnection.HTTP_CREATED) {
|
||||
LOGGER.warn("Unable to create or update message " + status + " " + putmethod.getStatusLine());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user