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

Caldav: untested, extended PROPFIND / response for iPhone 3.0

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@628 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-07-23 09:25:57 +00:00
parent b9f9bfce9a
commit 3051b42ca0

View File

@ -559,6 +559,29 @@ public class CaldavConnection extends AbstractConnection {
}
response.endPropStatOK();
response.endResponse();
if (request.depth == 1) {
response.startResponse("/users");
response.startPropstat();
if (request.hasProperty("displayname")) {
response.appendProperty("D:displayname", "users");
}
if (request.hasProperty("resourcetype")) {
response.appendProperty("D:resourcetype", "<D:collection/>");
}
response.endPropStatOK();
response.endResponse();
response.startResponse("/principals");
response.startPropstat();
if (request.hasProperty("displayname")) {
response.appendProperty("D:displayname", "principals");
}
if (request.hasProperty("resourcetype")) {
response.appendProperty("D:resourcetype", "<D:collection/>");
}
response.endPropStatOK();
response.endResponse();
}
response.endMultistatus();
response.close();
}
@ -704,7 +727,7 @@ public class CaldavConnection extends AbstractConnection {
public void sendUnauthorized() throws IOException {
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("WWW-Authenticate", "Basic realm=\"" + BundleMessage.format("UI_DAVMAIL_GATEWAY") + '\"');
sendHttpResponse(HttpStatus.SC_UNAUTHORIZED, headers, null, (byte[])null, false);
sendHttpResponse(HttpStatus.SC_UNAUTHORIZED, headers, null, (byte[]) null, false);
}
public void sendHttpResponse(int status) throws IOException {