diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingSessionInputBuffer.java b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingSessionInputBuffer.java index 5a590888e..3c5894403 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingSessionInputBuffer.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingSessionInputBuffer.java @@ -102,7 +102,7 @@ public class LoggingSessionInputBuffer implements SessionInputBuffer { public int readLine(final CharArrayBuffer buffer) throws IOException { int l = this.in.readLine(buffer); - if (this.wire.enabled() && l > 0) { + if (this.wire.enabled() && l >= 0) { int pos = buffer.length() - l; String s = new String(buffer.buffer(), pos, l); this.wire.input(s + "[EOL]");