mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
Revert to message url as default, use permanentUrl as failover
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@883 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
3ca83d3b2e
commit
b4d12102e6
@ -1512,7 +1512,16 @@ public class ExchangeSession {
|
|||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
*/
|
*/
|
||||||
public void write(OutputStream os) throws IOException {
|
public void write(OutputStream os) throws IOException {
|
||||||
GetMethod method = new GetMethod(permanentUrl);
|
try {
|
||||||
|
write(os, messageUrl);
|
||||||
|
} catch (HttpNotFoundException e) {
|
||||||
|
LOGGER.debug("Message not found at: "+messageUrl+", retrying with permanenturl");
|
||||||
|
write(os, permanentUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void write(OutputStream os, String url) throws IOException {
|
||||||
|
GetMethod method = new GetMethod(URIUtil.encodePath(url));
|
||||||
method.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
|
method.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
|
||||||
method.setRequestHeader("Translate", "f");
|
method.setRequestHeader("Translate", "f");
|
||||||
BufferedReader reader = null;
|
BufferedReader reader = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user