diff src/org/eclipse/jetty/http/HttpParser.java @ 1037:3c4c7cc7904f

rename Buffer.hasContent() to hasRemaining()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 03 Nov 2016 21:54:34 -0600
parents b87f97f6418a
children b71ad168fe34
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpParser.java	Thu Nov 03 21:42:41 2016 -0600
+++ b/src/org/eclipse/jetty/http/HttpParser.java	Thu Nov 03 21:54:34 2016 -0600
@@ -144,7 +144,7 @@
 		boolean progress = parseNext() > 0;
 
 		// continue parsing
-		while (!isComplete() && _buffer!=null && _buffer.length()>0 && !_contentView.hasContent())
+		while (!isComplete() && _buffer!=null && _buffer.length()>0 && !_contentView.hasRemaining())
 		{
 			progress |= parseNext()>0;
 		}
@@ -177,7 +177,7 @@
 				return 1;
 			}
 
-			int length=_buffer.length();
+			int length = _buffer.length();
 
 			// Fill buffer if we can
 			if (length == 0)
@@ -532,7 +532,7 @@
 
 									_contentPosition=0;
 									_eol=ch;
-									if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasContent() && _buffer.peek()==HttpTokens.LINE_FEED)
+									if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasRemaining() && _buffer.peek()==HttpTokens.LINE_FEED)
 										_eol=_buffer.get();
 
 									// We convert _contentLength to an int for this switch statement because
@@ -816,7 +816,7 @@
 
 							if (_chunkLength == 0)
 							{
-								if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasContent() && _buffer.peek()==HttpTokens.LINE_FEED)
+								if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasRemaining() && _buffer.peek()==HttpTokens.LINE_FEED)
 									_eol=_buffer.get();
 								_state = _persistent?STATE_END:STATE_SEEKING_EOF;
 								_handler.messageComplete(_contentPosition);
@@ -846,7 +846,7 @@
 							_eol=ch;
 							if (_chunkLength == 0)
 							{
-								if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasContent() && _buffer.peek()==HttpTokens.LINE_FEED)
+								if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasRemaining() && _buffer.peek()==HttpTokens.LINE_FEED)
 									_eol=_buffer.get();
 								_state = _persistent?STATE_END:STATE_SEEKING_EOF;
 								_handler.messageComplete(_contentPosition);
@@ -926,7 +926,7 @@
 			_buffer = _header;
 
 		// Is there unconsumed content in body buffer
-		if (_state>STATE_END && _buffer==_header && !_header.hasContent() && _body.hasContent())
+		if (_state>STATE_END && _buffer==_header && !_header.hasRemaining() && _body.hasRemaining())
 		{
 			_buffer = _body;
 			return _buffer.length();