Github user ok2c commented on a diff in the pull request: https://github.com/apache/httpcomponents-core/pull/59#discussion_r168495541 --- Diff: httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/ExpandableBuffer.java --- @@ -123,6 +123,10 @@ protected void expand() { // WARNING: This code assumes you are providing enough heap room with -Xmx. // source of inspiration: https://bugs.openjdk.java.net/browse/JDK-8059914 newcapacity = Integer.MAX_VALUE - headRoom; + if (newcapacity == this.buffer.capacity()) { --- End diff -- @imoldovan-intacct why not `newcapacity >= this.buffer.capacity()` ?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org