1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-10-31 15:35:05 -04:00

Caldav: just ignore calendar folder proppatch (color not supported in Exchange)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@426 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-03-09 16:02:58 +00:00
parent ba874940d8
commit fbd784ddc9

View File

@ -227,6 +227,8 @@ public class CaldavConnection extends AbstractConnection {
} }
} else if ("PROPFIND".equals(command) && "users".equals(paths[1]) && paths.length == 4 && "calendar".equals(paths[3])) { } else if ("PROPFIND".equals(command) && "users".equals(paths[1]) && paths.length == 4 && "calendar".equals(paths[3])) {
sendCalendar(request, depth, paths[2]); sendCalendar(request, depth, paths[2]);
} else if ("PROPPATCH".equals(command) && "users".equals(paths[1]) && paths.length == 4 && "calendar".equals(paths[3])) {
patchCalendar(request, depth, paths[2]);
} else if ("REPORT".equals(command) && "users".equals(paths[1]) && paths.length == 4 && "calendar".equals(paths[3]) } else if ("REPORT".equals(command) && "users".equals(paths[1]) && paths.length == 4 && "calendar".equals(paths[3])
// only current user for now // only current user for now
&& session.getEmail().equalsIgnoreCase(paths[2])) { && session.getEmail().equalsIgnoreCase(paths[2])) {
@ -411,6 +413,14 @@ public class CaldavConnection extends AbstractConnection {
sendHttpResponse(HttpStatus.SC_MULTI_STATUS, null, response, true); sendHttpResponse(HttpStatus.SC_MULTI_STATUS, null, response, true);
} }
public void patchCalendar(CaldavRequest request, int depth, String principal) throws IOException {
CaldavResponse response = new CaldavResponse();
response.startMultistatus();
// just ignore calendar folder proppatch (color not supported in Exchange)
response.endMultistatus();
sendHttpResponse(HttpStatus.SC_MULTI_STATUS, null, response, true);
}
protected String getEventFileNameFromPath(String path) { protected String getEventFileNameFromPath(String path) {
int index = path.lastIndexOf('/'); int index = path.lastIndexOf('/');
if (index < 0) { if (index < 0) {