mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-11 20:05:03 -05:00
Caldav: Fix invalid event handling, exclude events from returned list
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@910 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
741ba5f889
commit
eaed630ea4
@ -2481,7 +2481,13 @@ public class ExchangeSession {
|
|||||||
String instancetype = getPropertyIfExists(response.getProperties(HttpStatus.SC_OK), "instancetype", Namespace.getNamespace("urn:schemas:calendar:"));
|
String instancetype = getPropertyIfExists(response.getProperties(HttpStatus.SC_OK), "instancetype", Namespace.getNamespace("urn:schemas:calendar:"));
|
||||||
Event event = buildEvent(response);
|
Event event = buildEvent(response);
|
||||||
if (instancetype == null && event.getICS() == null) {
|
if (instancetype == null && event.getICS() == null) {
|
||||||
LOGGER.warn("Invalid event found at " + response.getHref());
|
// check ics content
|
||||||
|
try {
|
||||||
|
event.getICS();
|
||||||
|
} catch (IOException e) {
|
||||||
|
// invalid event: exclude from list
|
||||||
|
LOGGER.warn("Invalid event found at " + response.getHref(), e);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
events.add(event);
|
events.add(event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user