1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 03:02:22 -05:00

Caldav fix for iCal : allow /user instead of /user/ and /calendar instead of /calendar/

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@244 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2008-12-23 14:28:18 +00:00
parent 30a81908bb
commit 441955eadc

View File

@ -159,7 +159,8 @@ public class CaldavConnection extends AbstractConnection {
int depth = getDepth(headers);
if ("OPTIONS".equals(command)) {
sendOptions();
} else if ("PROPFIND".equals(command) && "/user/".equals(path)) {
} else if ("PROPFIND".equals(command)
&& ("/user/".equals(path) || "/user".equals(path))) {
CaldavRequest request = new CaldavRequest(body);
StringBuilder buffer = new StringBuilder();
buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
@ -199,7 +200,9 @@ public class CaldavConnection extends AbstractConnection {
buffer.append("</D:multistatus>\n");
sendHttpResponse(HttpStatus.SC_MULTI_STATUS, null, "text/xml;charset=UTF-8", buffer.toString(), true);
} else if ("PROPFIND".equals(command) && "/calendar/".equals(path) && depth == 0 && body != null) {
} else if ("PROPFIND".equals(command)
&& ("/calendar/".equals(path) || "/calendar".equals(path))
&& depth == 0 && body != null) {
CaldavRequest request = new CaldavRequest(body);
StringBuilder buffer = new StringBuilder();