mirror of
https://github.com/moparisthebest/davmail
synced 2024-08-13 16:53:51 -04:00
EWS: disable gzip encoding if WIRE logging is at DEBUG level
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1971 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
599c0de815
commit
3c534221f5
@ -28,6 +28,7 @@ import org.apache.commons.codec.binary.Base64;
|
|||||||
import org.apache.commons.httpclient.*;
|
import org.apache.commons.httpclient.*;
|
||||||
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.Level;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.codehaus.stax2.typed.TypedXMLStreamReader;
|
import org.codehaus.stax2.typed.TypedXMLStreamReader;
|
||||||
|
|
||||||
@ -107,7 +108,8 @@ public abstract class EWSMethod extends PostMethod {
|
|||||||
this.itemType = itemType;
|
this.itemType = itemType;
|
||||||
this.methodName = methodName;
|
this.methodName = methodName;
|
||||||
this.responseCollectionName = responseCollectionName;
|
this.responseCollectionName = responseCollectionName;
|
||||||
if (Settings.getBooleanProperty("davmail.acceptEncodingGzip", true)) {
|
if (Settings.getBooleanProperty("davmail.acceptEncodingGzip", true) &&
|
||||||
|
!Level.DEBUG.toString().equals(Settings.getBooleanProperty("log4j.logger.httpclient.wire"))) {
|
||||||
setRequestHeader("Accept-Encoding", "gzip");
|
setRequestHeader("Accept-Encoding", "gzip");
|
||||||
}
|
}
|
||||||
setRequestEntity(new RequestEntity() {
|
setRequestEntity(new RequestEntity() {
|
||||||
|
Loading…
Reference in New Issue
Block a user