mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
EWS: handle chunked inputstream inside gzip
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1935 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
007a328051
commit
9ae80ce478
@ -24,10 +24,7 @@ import davmail.http.DavGatewayHttpClientFacade;
|
|||||||
import davmail.ui.tray.DavGatewayTray;
|
import davmail.ui.tray.DavGatewayTray;
|
||||||
import davmail.util.StringUtil;
|
import davmail.util.StringUtil;
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.commons.httpclient.Header;
|
import org.apache.commons.httpclient.*;
|
||||||
import org.apache.commons.httpclient.HttpConnection;
|
|
||||||
import org.apache.commons.httpclient.HttpState;
|
|
||||||
import org.apache.commons.httpclient.HttpStatus;
|
|
||||||
import org.apache.commons.httpclient.methods.PostMethod;
|
import org.apache.commons.httpclient.methods.PostMethod;
|
||||||
import org.apache.commons.httpclient.methods.RequestEntity;
|
import org.apache.commons.httpclient.methods.RequestEntity;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
@ -1021,7 +1018,7 @@ public abstract class EWSMethod extends PostMethod {
|
|||||||
if (contentTypeHeader != null && "text/xml; charset=utf-8".equals(contentTypeHeader.getValue())) {
|
if (contentTypeHeader != null && "text/xml; charset=utf-8".equals(contentTypeHeader.getValue())) {
|
||||||
try {
|
try {
|
||||||
if (DavGatewayHttpClientFacade.isGzipEncoded(this)) {
|
if (DavGatewayHttpClientFacade.isGzipEncoded(this)) {
|
||||||
processResponseStream(new GZIPInputStream(getResponseBodyAsStream()));
|
processResponseStream(new ChunkedInputStream(new GZIPInputStream(getResponseBodyAsStream())));
|
||||||
} else {
|
} else {
|
||||||
processResponseStream(getResponseBodyAsStream());
|
processResponseStream(getResponseBodyAsStream());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user