Index: src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java =================================================================== --- src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java (revision 4461) +++ src/main/java-deprecated/org/apache/http/impl/conn/DefaultClientConnection.java (working copy) @@ -69,6 +69,9 @@ public class DefaultClientConnection extends SocketHttpClientConnection implements OperatedClientConnection, ManagedHttpClientConnection, HttpContext { + /** Name of header which holds authorization information */ + private static final String HEADER_AUTHORIZATION = "Authorization"; + private final Log log = LogFactory.getLog(getClass()); private final Log headerLog = LogFactory.getLog("org.apache.http.headers"); private final Log wireLog = LogFactory.getLog("org.apache.http.wire"); @@ -272,7 +275,9 @@ headerLog.debug(">> " + request.getRequestLine().toString()); final Header[] headers = request.getAllHeaders(); for (final Header header : headers) { - headerLog.debug(">> " + header.toString()); + if(!header.getName().equalsIgnoreCase(HEADER_AUTHORIZATION)){ + headerLog.debug(">> " + header.toString()); + } } } } Index: src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionOutputBuffer.java =================================================================== --- src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionOutputBuffer.java (revision 4461) +++ src/main/java-deprecated/org/apache/http/impl/conn/LoggingSessionOutputBuffer.java (working copy) @@ -43,6 +43,9 @@ @Deprecated public class LoggingSessionOutputBuffer implements SessionOutputBuffer { + /** Name of header which holds authorization information */ + private static final String HEADER_AUTHORIZATION = "Authorization"; + /** Original data transmitter. */ private final SessionOutputBuffer out; @@ -99,7 +102,9 @@ if (this.wire.enabled()) { final String s = new String(buffer.buffer(), 0, buffer.length()); final String tmp = s + "\r\n"; - this.wire.output(tmp.getBytes(this.charset)); + if( !tmp.contains(HEADER_AUTHORIZATION)) { + this.wire.output(tmp.getBytes(this.charset)); + } } }