Caldav: Improve calendar-color patch answer
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@572 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
f1ac470532
commit
1d9bb4aebb
|
@ -98,7 +98,8 @@ public class CaldavConnection extends AbstractConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
String line;
|
String line;
|
||||||
StringTokenizer tokens;
|
StringTokenizer tokens;
|
||||||
|
|
||||||
|
@ -218,7 +219,7 @@ public class CaldavConnection extends AbstractConnection {
|
||||||
} else if (request.isPropFind()) {
|
} else if (request.isPropFind()) {
|
||||||
sendCalendar(request);
|
sendCalendar(request);
|
||||||
} else if (request.isPropPatch()) {
|
} else if (request.isPropPatch()) {
|
||||||
patchCalendar();
|
patchCalendar(request);
|
||||||
} else if (request.isReport()) {
|
} else if (request.isReport()) {
|
||||||
reportEvents(request);
|
reportEvents(request);
|
||||||
}
|
}
|
||||||
|
@ -417,10 +418,15 @@ public class CaldavConnection extends AbstractConnection {
|
||||||
response.close();
|
response.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void patchCalendar() throws IOException {
|
public void patchCalendar(CaldavRequest request) throws IOException {
|
||||||
CaldavResponse response = new CaldavResponse(HttpStatus.SC_MULTI_STATUS);
|
CaldavResponse response = new CaldavResponse(HttpStatus.SC_MULTI_STATUS);
|
||||||
response.startMultistatus();
|
response.startMultistatus();
|
||||||
// just ignore calendar folder proppatch (color not supported in Exchange)
|
// just ignore calendar folder proppatch (color not supported in Exchange)
|
||||||
|
if (request.hasProperty("calendar-color")) {
|
||||||
|
response.startPropstat();
|
||||||
|
response.appendProperty("x1:calendar-color", "x1=\"http://apple.com/ns/ical/\"", null);
|
||||||
|
response.endPropStatOK();
|
||||||
|
}
|
||||||
response.endMultistatus();
|
response.endMultistatus();
|
||||||
response.close();
|
response.close();
|
||||||
}
|
}
|
||||||
|
@ -1102,6 +1108,10 @@ public class CaldavConnection extends AbstractConnection {
|
||||||
} else {
|
} else {
|
||||||
writer.write('<');
|
writer.write('<');
|
||||||
writer.write(propertyName);
|
writer.write(propertyName);
|
||||||
|
if (namespace != null) {
|
||||||
|
writer.write(" xmlns:");
|
||||||
|
writer.write(namespace);
|
||||||
|
}
|
||||||
writer.write("/>");
|
writer.write("/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue