mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
EWS: revert chunked inputstream inside gzip and create new setting davmail.acceptEncodingGzip
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1936 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
9ae80ce478
commit
4a116b8fb9
@ -19,6 +19,7 @@
|
||||
package davmail.exchange.ews;
|
||||
|
||||
import davmail.BundleMessage;
|
||||
import davmail.Settings;
|
||||
import davmail.exchange.XMLStreamUtil;
|
||||
import davmail.http.DavGatewayHttpClientFacade;
|
||||
import davmail.ui.tray.DavGatewayTray;
|
||||
@ -106,7 +107,9 @@ public abstract class EWSMethod extends PostMethod {
|
||||
this.itemType = itemType;
|
||||
this.methodName = methodName;
|
||||
this.responseCollectionName = responseCollectionName;
|
||||
if (Settings.getBooleanProperty("davmail.acceptEncodingGzip", true)) {
|
||||
setRequestHeader("Accept-Encoding", "gzip");
|
||||
}
|
||||
setRequestEntity(new RequestEntity() {
|
||||
byte[] content;
|
||||
|
||||
@ -1018,7 +1021,7 @@ public abstract class EWSMethod extends PostMethod {
|
||||
if (contentTypeHeader != null && "text/xml; charset=utf-8".equals(contentTypeHeader.getValue())) {
|
||||
try {
|
||||
if (DavGatewayHttpClientFacade.isGzipEncoded(this)) {
|
||||
processResponseStream(new ChunkedInputStream(new GZIPInputStream(getResponseBodyAsStream())));
|
||||
processResponseStream(new GZIPInputStream(getResponseBodyAsStream()));
|
||||
} else {
|
||||
processResponseStream(getResponseBodyAsStream());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user