mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Caldav: Fix regressions in Vcalendar handling
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1326 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
1d4c095dc1
commit
1488b2dd1e
@ -1948,7 +1948,6 @@ public abstract class ExchangeSession {
|
||||
String boundary = UUID.randomUUID().toString();
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
MimeOutputStreamWriter writer = new MimeOutputStreamWriter(baos);
|
||||
String method = vCalendar.getMethod();
|
||||
|
||||
writer.writeHeader("Content-Transfer-Encoding", "7bit");
|
||||
writer.writeHeader("Content-class", contentClass);
|
||||
@ -2008,12 +2007,9 @@ public abstract class ExchangeSession {
|
||||
} else {
|
||||
writer.writeHeader("From", email);
|
||||
}
|
||||
// if not organizer, set REPLYTIME to force Outlook in attendee mode
|
||||
if (recipients.organizer != null && !email.equalsIgnoreCase(recipients.organizer)) {
|
||||
if (method == null) {
|
||||
vCalendar.setPropertyValue("METHOD", "REQUEST");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (vCalendar.getMethod() == null) {
|
||||
vCalendar.setPropertyValue("METHOD", "REQUEST");
|
||||
}
|
||||
writer.writeHeader("MIME-Version", "1.0");
|
||||
writer.writeHeader("Content-Type", "multipart/alternative;\r\n" +
|
||||
@ -2039,7 +2035,7 @@ public abstract class ExchangeSession {
|
||||
}
|
||||
writer.writeHeader("Content-class", contentClass);
|
||||
writer.writeHeader("Content-Type", "text/calendar;\r\n" +
|
||||
"\tmethod=" + method + ";\r\n" +
|
||||
"\tmethod=" + vCalendar.getMethod() + ";\r\n" +
|
||||
"\tcharset=\"utf-8\""
|
||||
);
|
||||
writer.writeHeader("Content-Transfer-Encoding", "8bit");
|
||||
|
@ -293,11 +293,6 @@ public class VCalendar extends VObject {
|
||||
}
|
||||
} else {
|
||||
property.setValue(replaceIcal4Principal(property.getValue()));
|
||||
|
||||
// ignore attendee as organizer
|
||||
if (property.getValue().contains(email)) {
|
||||
property.setValue(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,11 +275,13 @@ public final class StringUtil {
|
||||
|
||||
public static String base64ToUrl(String value) {
|
||||
String result = value;
|
||||
if (result.indexOf('+') >= 0) {
|
||||
result = PLUS_PATTERN.matcher(result).replaceAll("-");
|
||||
}
|
||||
if (result.indexOf('/') >= 0) {
|
||||
result = SLASH_PATTERN.matcher(result).replaceAll("_");
|
||||
if (value != null) {
|
||||
if (result.indexOf('+') >= 0) {
|
||||
result = PLUS_PATTERN.matcher(result).replaceAll("-");
|
||||
}
|
||||
if (result.indexOf('/') >= 0) {
|
||||
result = SLASH_PATTERN.matcher(result).replaceAll("_");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user