mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-07 03:38:05 -05:00
IMAP: First fix for bug 2840255, do not follow redirects on message FETCH
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@684 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
b053ceaf67
commit
cdf3ebe683
@ -1277,7 +1277,12 @@ public class ExchangeSession {
|
|||||||
method = new GetMethod(URIUtil.encodePath(messageUrl));
|
method = new GetMethod(URIUtil.encodePath(messageUrl));
|
||||||
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");
|
||||||
httpClient.executeMethod(method);
|
// do not follow redirects in expired session
|
||||||
|
method.setFollowRedirects(false);
|
||||||
|
int status = httpClient.executeMethod(method);
|
||||||
|
if (status != HttpStatus.SC_OK) {
|
||||||
|
throw DavGatewayHttpClientFacade.buildHttpException(method);
|
||||||
|
}
|
||||||
|
|
||||||
reader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream()));
|
reader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream()));
|
||||||
OutputStreamWriter isoWriter = new OutputStreamWriter(os);
|
OutputStreamWriter isoWriter = new OutputStreamWriter(os);
|
||||||
|
Loading…
Reference in New Issue
Block a user