mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-12 18:52:21 -05:00
decode tilde in attachment name and allow 302 in testConfig
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@54 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
8ba3b3ac8b
commit
671fd5758a
@ -184,7 +184,8 @@ public class ExchangeSession {
|
||||
int status = httpClient.executeMethod(testMethod);
|
||||
testMethod.releaseConnection();
|
||||
logger.debug("Test configuration status: " + status);
|
||||
if (status != HttpStatus.SC_OK && status != HttpStatus.SC_UNAUTHORIZED) {
|
||||
if (status != HttpStatus.SC_OK && status != HttpStatus.SC_UNAUTHORIZED
|
||||
&& status != HttpStatus.SC_MOVED_TEMPORARILY) {
|
||||
throw new IOException("Unable to connect to OWA at " + url + ", status code " +
|
||||
status + ", check configuration");
|
||||
}
|
||||
@ -1252,6 +1253,8 @@ public class ExchangeSession {
|
||||
}
|
||||
// decode slashes in attachment name
|
||||
attachmentName = attachmentName.replaceAll("_xF8FF_", "/");
|
||||
// decode tilde
|
||||
attachmentName = attachmentName.replaceAll("_x007E_", "~");
|
||||
// trim attachment name
|
||||
attachmentName = attachmentName.trim();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user