mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
Do not send Exchange 2003 appointment creation request to Exchange 2007
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1561 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
3bc182ff08
commit
47e90d9bec
@ -2086,18 +2086,20 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
String folderPath = getFolderPath("davmailtemp");
|
||||
createCalendarFolder(folderPath, null);
|
||||
|
||||
PostMethod postMethod = new PostMethod(URIUtil.encodePath(folderPath));
|
||||
postMethod.addParameter("Cmd", "saveappt");
|
||||
postMethod.addParameter("FORMTYPE", "appointment");
|
||||
String fakeEventUrl = null;
|
||||
try {
|
||||
// create fake event
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
fakeEventUrl = StringUtil.getToken(postMethod.getResponseBodyAsString(), "<span id=\"itemHREF\">", "</span>");
|
||||
if ("Exchange2003".equals(serverVersion)) {
|
||||
PostMethod postMethod = new PostMethod(URIUtil.encodePath(folderPath));
|
||||
postMethod.addParameter("Cmd", "saveappt");
|
||||
postMethod.addParameter("FORMTYPE", "appointment");
|
||||
try {
|
||||
// create fake event
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
fakeEventUrl = StringUtil.getToken(postMethod.getResponseBodyAsString(), "<span id=\"itemHREF\">", "</span>");
|
||||
}
|
||||
} finally {
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
} finally {
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
// failover for Exchange 2007, use PROPPATCH with forced timezone
|
||||
if (fakeEventUrl == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user