mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-12 22:18:11 -05:00
Caldav: avoid duplicate / in event path
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@530 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4e81ef3828
commit
b099a9aaa0
@ -265,8 +265,14 @@ public class CaldavConnection extends AbstractConnection {
|
||||
}
|
||||
|
||||
protected void appendEventResponse(CaldavResponse response, CaldavRequest request, ExchangeSession.Event event) throws IOException {
|
||||
String eventPath = xmlEncodeName(event.getPath());
|
||||
response.startResponse(URIUtil.encodePath(request.getPath()) + "/" + URIUtil.encodeWithinQuery(eventPath));
|
||||
StringBuilder eventPath = new StringBuilder();
|
||||
eventPath.append(URIUtil.encodePath(request.getPath()));
|
||||
if (!(eventPath.charAt(eventPath.length()-1) == '/')) {
|
||||
eventPath.append('/');
|
||||
}
|
||||
String eventName = xmlEncodeName(event.getPath());
|
||||
eventPath.append(URIUtil.encodeWithinQuery(eventName));
|
||||
response.startResponse(eventPath.toString());
|
||||
response.startPropstat();
|
||||
if (request.hasProperty("calendar-data")) {
|
||||
response.appendCalendarData(event.getICS());
|
||||
@ -281,7 +287,7 @@ public class CaldavConnection extends AbstractConnection {
|
||||
response.appendProperty("D:resourcetype");
|
||||
}
|
||||
if (request.hasProperty("displayname")) {
|
||||
response.appendProperty("D:displayname", eventPath);
|
||||
response.appendProperty("D:displayname", eventName);
|
||||
}
|
||||
response.endPropStatOK();
|
||||
response.endResponse();
|
||||
|
Loading…
Reference in New Issue
Block a user