1
0
mirror of https://github.com/moparisthebest/davmail synced 2025-02-28 09:21:49 -05:00

Caldav: revert supported-calendar-component-set on root and improve logging

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@604 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-06-25 10:16:46 +00:00
parent fc31316c14
commit 7971111c1c

View File

@ -531,10 +531,8 @@ public class CaldavConnection extends AbstractConnection {
if (request.hasProperty("displayname")) {
response.appendProperty("D:displayname", "ROOT");
}
if (request.hasProperty("supported-calendar-component-set")) {
response.appendProperty("C:supported-calendar-component-set",
"<C:comp name=\"VEVENT\"/>" +
"<C:comp name=\"VTODO\"/>");
if (request.hasProperty("resourcetype")) {
response.appendProperty("D:resourcetype", "<D:collection/>");
}
response.endPropStatOK();
response.endResponse();
@ -882,6 +880,8 @@ public class CaldavConnection extends AbstractConnection {
public String getPath(String subFolder) {
if (subFolder == null || subFolder.length() == 0) {
return path;
} else if (path.endsWith("/")) {
return path + subFolder;
} else {
return path + '/' + subFolder;
}
@ -1052,6 +1052,11 @@ public class CaldavConnection extends AbstractConnection {
public void write(byte[] data, int offset, int length) throws IOException {
sendClient(Integer.toHexString(length));
sendClient(data, offset, length);
if (wireLogger.isDebugEnabled()) {
StringBuilder logBuffer = new StringBuilder("> ");
logBuffer.append(new String(data, offset, length));
wireLogger.debug(logBuffer.toString());
}
sendClient("");
}