mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-04 16:35:01 -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();
|
String boundary = UUID.randomUUID().toString();
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
MimeOutputStreamWriter writer = new MimeOutputStreamWriter(baos);
|
MimeOutputStreamWriter writer = new MimeOutputStreamWriter(baos);
|
||||||
String method = vCalendar.getMethod();
|
|
||||||
|
|
||||||
writer.writeHeader("Content-Transfer-Encoding", "7bit");
|
writer.writeHeader("Content-Transfer-Encoding", "7bit");
|
||||||
writer.writeHeader("Content-class", contentClass);
|
writer.writeHeader("Content-class", contentClass);
|
||||||
@ -2008,13 +2007,10 @@ public abstract class ExchangeSession {
|
|||||||
} else {
|
} else {
|
||||||
writer.writeHeader("From", email);
|
writer.writeHeader("From", email);
|
||||||
}
|
}
|
||||||
// if not organizer, set REPLYTIME to force Outlook in attendee mode
|
}
|
||||||
if (recipients.organizer != null && !email.equalsIgnoreCase(recipients.organizer)) {
|
if (vCalendar.getMethod() == null) {
|
||||||
if (method == null) {
|
|
||||||
vCalendar.setPropertyValue("METHOD", "REQUEST");
|
vCalendar.setPropertyValue("METHOD", "REQUEST");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
writer.writeHeader("MIME-Version", "1.0");
|
writer.writeHeader("MIME-Version", "1.0");
|
||||||
writer.writeHeader("Content-Type", "multipart/alternative;\r\n" +
|
writer.writeHeader("Content-Type", "multipart/alternative;\r\n" +
|
||||||
"\tboundary=\"----=_NextPart_" + boundary + '\"');
|
"\tboundary=\"----=_NextPart_" + boundary + '\"');
|
||||||
@ -2039,7 +2035,7 @@ public abstract class ExchangeSession {
|
|||||||
}
|
}
|
||||||
writer.writeHeader("Content-class", contentClass);
|
writer.writeHeader("Content-class", contentClass);
|
||||||
writer.writeHeader("Content-Type", "text/calendar;\r\n" +
|
writer.writeHeader("Content-Type", "text/calendar;\r\n" +
|
||||||
"\tmethod=" + method + ";\r\n" +
|
"\tmethod=" + vCalendar.getMethod() + ";\r\n" +
|
||||||
"\tcharset=\"utf-8\""
|
"\tcharset=\"utf-8\""
|
||||||
);
|
);
|
||||||
writer.writeHeader("Content-Transfer-Encoding", "8bit");
|
writer.writeHeader("Content-Transfer-Encoding", "8bit");
|
||||||
|
@ -293,11 +293,6 @@ public class VCalendar extends VObject {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
property.setValue(replaceIcal4Principal(property.getValue()));
|
property.setValue(replaceIcal4Principal(property.getValue()));
|
||||||
|
|
||||||
// ignore attendee as organizer
|
|
||||||
if (property.getValue().contains(email)) {
|
|
||||||
property.setValue(null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,12 +275,14 @@ public final class StringUtil {
|
|||||||
|
|
||||||
public static String base64ToUrl(String value) {
|
public static String base64ToUrl(String value) {
|
||||||
String result = value;
|
String result = value;
|
||||||
|
if (value != null) {
|
||||||
if (result.indexOf('+') >= 0) {
|
if (result.indexOf('+') >= 0) {
|
||||||
result = PLUS_PATTERN.matcher(result).replaceAll("-");
|
result = PLUS_PATTERN.matcher(result).replaceAll("-");
|
||||||
}
|
}
|
||||||
if (result.indexOf('/') >= 0) {
|
if (result.indexOf('/') >= 0) {
|
||||||
result = SLASH_PATTERN.matcher(result).replaceAll("_");
|
result = SLASH_PATTERN.matcher(result).replaceAll("_");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user