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;
|
||||
StringTokenizer tokens;
|
||||
|
||||
|
@ -218,7 +219,7 @@ public class CaldavConnection extends AbstractConnection {
|
|||
} else if (request.isPropFind()) {
|
||||
sendCalendar(request);
|
||||
} else if (request.isPropPatch()) {
|
||||
patchCalendar();
|
||||
patchCalendar(request);
|
||||
} else if (request.isReport()) {
|
||||
reportEvents(request);
|
||||
}
|
||||
|
@ -417,10 +418,15 @@ public class CaldavConnection extends AbstractConnection {
|
|||
response.close();
|
||||
}
|
||||
|
||||
public void patchCalendar() throws IOException {
|
||||
public void patchCalendar(CaldavRequest request) throws IOException {
|
||||
CaldavResponse response = new CaldavResponse(HttpStatus.SC_MULTI_STATUS);
|
||||
response.startMultistatus();
|
||||
// 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.close();
|
||||
}
|
||||
|
@ -1102,6 +1108,10 @@ public class CaldavConnection extends AbstractConnection {
|
|||
} else {
|
||||
writer.write('<');
|
||||
writer.write(propertyName);
|
||||
if (namespace != null) {
|
||||
writer.write(" xmlns:");
|
||||
writer.write(namespace);
|
||||
}
|
||||
writer.write("/>");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue