Mercurial Hosting > luan
changeset 1071:b4ba8a4d5a16
remove JBuffer.space()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 10 Nov 2016 02:13:28 -0700 |
parents | a44fc6b53757 |
children | 00704b28b9f1 |
files | src/org/eclipse/jetty/http/HttpGenerator.java src/org/eclipse/jetty/http/HttpParser.java src/org/eclipse/jetty/io/JBuffer.java src/org/eclipse/jetty/io/nio/SslConnection.java |
diffstat | 4 files changed, 5 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
diff -r a44fc6b53757 -r b4ba8a4d5a16 src/org/eclipse/jetty/http/HttpGenerator.java --- a/src/org/eclipse/jetty/http/HttpGenerator.java Thu Nov 10 01:23:37 2016 -0700 +++ b/src/org/eclipse/jetty/http/HttpGenerator.java Thu Nov 10 02:13:28 2016 -0700 @@ -217,13 +217,6 @@ } _contentWritten -= _buffer.position(); -/* - // Handle the _content - if (_head) - return Integer.MAX_VALUE; - - return _buffer.space(); -*/ } public boolean isBufferFull()
diff -r a44fc6b53757 -r b4ba8a4d5a16 src/org/eclipse/jetty/http/HttpParser.java --- a/src/org/eclipse/jetty/http/HttpParser.java Thu Nov 10 01:23:37 2016 -0700 +++ b/src/org/eclipse/jetty/http/HttpParser.java Thu Nov 10 02:13:28 2016 -0700 @@ -996,7 +996,7 @@ } // Are we full? - if (_buffer.space() == 0) + if (_buffer.limit() == _buffer.capacity()) { LOG.warn("HttpParser Full for {} ",_endp); clear();
diff -r a44fc6b53757 -r b4ba8a4d5a16 src/org/eclipse/jetty/io/JBuffer.java --- a/src/org/eclipse/jetty/io/JBuffer.java Thu Nov 10 01:23:37 2016 -0700 +++ b/src/org/eclipse/jetty/io/JBuffer.java Thu Nov 10 02:13:28 2016 -0700 @@ -85,15 +85,6 @@ bb.clear(); } - public void clearJ() { - bb.position(0); - bb.limit(0); - } - - public int space() { - return bb.capacity() - bb.limit(); - } - public void get(byte[] b, int offset, int length) { bb.get(b,offset,length);
diff -r a44fc6b53757 -r b4ba8a4d5a16 src/org/eclipse/jetty/io/nio/SslConnection.java --- a/src/org/eclipse/jetty/io/nio/SslConnection.java Thu Nov 10 01:23:37 2016 -0700 +++ b/src/org/eclipse/jetty/io/nio/SslConnection.java Thu Nov 10 02:13:28 2016 -0700 @@ -146,7 +146,7 @@ _outbound.remaining()==0 && _unwrapBuf.remaining()==0) { - _inbound=null; + _inbound = null; _outbound = null; _unwrapBuf=null; __buffers.set(_buffers); @@ -269,7 +269,7 @@ try { // Read any available data - if (_inbound.space()>0 && (filled=_endp.fill(_inbound))>0) + if (_inbound.capacity()>_inbound.limit() && (filled=_endp.fill(_inbound))>0) progress = true; // flush any output data @@ -295,11 +295,11 @@ case NOT_HANDSHAKING: { // Try unwrapping some application data - if (toFill.space()>0 && _inbound.hasRemaining() && unwrap(toFill)) + if (toFill.capacity()>toFill.limit() && _inbound.hasRemaining() && unwrap(toFill)) progress=true; // Try wrapping some application data - if (toFlush.hasRemaining() && _outbound.space()>0 && wrap(toFlush)) + if (toFlush.hasRemaining() && _outbound.capacity()>_outbound.limit() && wrap(toFlush)) progress=true; } break;